@vvfx/sdk 0.0.0-alpha.23 → 0.0.0-alpha.24
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 +380 -77
- package/dist/index.d.ts +380 -77
- package/dist/index.global.js +16 -25
- package/dist/index.js +1 -1
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -46,40 +46,6 @@ 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
|
-
|
|
83
49
|
type BaseFormProperty = {
|
|
84
50
|
position: [number, number, number];
|
|
85
51
|
rotation: [number, number, number];
|
|
@@ -128,18 +94,10 @@ type SpecificPageFormProps<T extends keyof PageFormTypeAndPropertyReference> = {
|
|
|
128
94
|
property: PageFormTypeAndPropertyReference[T];
|
|
129
95
|
onPropertyValueChange: <N extends keyof PageFormTypeAndPropertyReference[T]>(propertyName: N, propertyValue: PageFormTypeAndPropertyReference[T][N]) => void;
|
|
130
96
|
};
|
|
131
|
-
/** 视频导出状态 */
|
|
132
|
-
declare const ExportStatusMap: {
|
|
133
|
-
readonly DEFAULT: "default";
|
|
134
|
-
readonly EXPORTING: "exporting";
|
|
135
|
-
readonly SUCCESS: "success";
|
|
136
|
-
readonly ERROR: "error";
|
|
137
|
-
};
|
|
138
97
|
type SDKOptions = {
|
|
139
98
|
/** 导出视频时,是否开启转码日志 */
|
|
140
99
|
loggerInExportVideoTranscoding?: boolean;
|
|
141
100
|
};
|
|
142
|
-
type ExportStatus = typeof ExportStatusMap[keyof typeof ExportStatusMap];
|
|
143
101
|
/**
|
|
144
102
|
* @description SDK入参
|
|
145
103
|
*/
|
|
@@ -156,14 +114,6 @@ type SDKInputParam = {
|
|
|
156
114
|
* @description 页面属性
|
|
157
115
|
*/
|
|
158
116
|
options: PageOptions;
|
|
159
|
-
/**
|
|
160
|
-
* @description 是否开启出血区强制变换
|
|
161
|
-
*/
|
|
162
|
-
keepSafe?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
* @description 是否开启静态预览功能 - 第一个合成仅支持播放,不可编辑
|
|
165
|
-
*/
|
|
166
|
-
staticPreview?: boolean;
|
|
167
117
|
};
|
|
168
118
|
/**
|
|
169
119
|
* @description 页面属性
|
|
@@ -218,7 +168,7 @@ type PageData = {
|
|
|
218
168
|
/**
|
|
219
169
|
* @description 页面配置
|
|
220
170
|
*/
|
|
221
|
-
type PageConfig = {
|
|
171
|
+
type PageConfig$1 = {
|
|
222
172
|
/**
|
|
223
173
|
* @description 出血区域展示开关
|
|
224
174
|
*/
|
|
@@ -272,7 +222,7 @@ type ViewParam = {
|
|
|
272
222
|
/**
|
|
273
223
|
* @description 出血区参数
|
|
274
224
|
*/
|
|
275
|
-
safeArea
|
|
225
|
+
safeArea?: [number, number, number, number];
|
|
276
226
|
/**
|
|
277
227
|
* @description 自定义出血区 - 用于展示
|
|
278
228
|
*/
|
|
@@ -335,10 +285,6 @@ type ViewProperty = {
|
|
|
335
285
|
* @description 视图场景数据
|
|
336
286
|
*/
|
|
337
287
|
scene: spec.JSONScene;
|
|
338
|
-
/**
|
|
339
|
-
* @description 预览图数据
|
|
340
|
-
*/
|
|
341
|
-
thumbnail: string;
|
|
342
288
|
/**
|
|
343
289
|
* @description 导出参数
|
|
344
290
|
*/
|
|
@@ -412,6 +358,284 @@ type ViewItem = {
|
|
|
412
358
|
endBehavior: spec.EndBehavior;
|
|
413
359
|
} & ViewItemTypedProperty;
|
|
414
360
|
|
|
361
|
+
declare const MEDIA_TYPE: {
|
|
362
|
+
readonly APNG: "APNG";
|
|
363
|
+
readonly MP4: "MP4";
|
|
364
|
+
readonly WebM: "WebM";
|
|
365
|
+
readonly Images: "Images";
|
|
366
|
+
readonly WebP: "WebP";
|
|
367
|
+
readonly GIF: "GIF";
|
|
368
|
+
readonly AlphaMaskVideo: "AlphaMaskVideo";
|
|
369
|
+
};
|
|
370
|
+
|
|
371
|
+
declare global {
|
|
372
|
+
interface Window {
|
|
373
|
+
/**
|
|
374
|
+
* @description 创建 WebP Core 实例
|
|
375
|
+
*/
|
|
376
|
+
createWebPCore: (config: any) => Promise<Img2WebPCore>;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
type MediaType = typeof MEDIA_TYPE[keyof typeof MEDIA_TYPE];
|
|
380
|
+
type FS = {
|
|
381
|
+
writeFile: (path: string, data: Uint8Array | string) => void;
|
|
382
|
+
readFile(path: string, opts: {
|
|
383
|
+
encoding: 'binary';
|
|
384
|
+
flags?: string | undefined;
|
|
385
|
+
}): Uint8Array;
|
|
386
|
+
readFile(path: string, opts: {
|
|
387
|
+
encoding: 'utf8';
|
|
388
|
+
flags?: string | undefined;
|
|
389
|
+
}): string;
|
|
390
|
+
readFile(path: string, opts?: {
|
|
391
|
+
flags?: string | undefined;
|
|
392
|
+
}): Uint8Array;
|
|
393
|
+
unlink: (path: string) => void;
|
|
394
|
+
quit: () => void;
|
|
395
|
+
};
|
|
396
|
+
type Pointer = number;
|
|
397
|
+
type Img2WebPCore = {
|
|
398
|
+
FS: FS;
|
|
399
|
+
run: (...args: string[]) => number;
|
|
400
|
+
cwrap: (ident: string, returnType: string, argTypes: string[]) => ((argc: number, argv: Pointer) => number);
|
|
401
|
+
_malloc: (size: number) => Pointer;
|
|
402
|
+
writeAsciiToMemory: (str: string, buffer: number, dontAddNull?: boolean) => void;
|
|
403
|
+
setValue: (ptr: number, value: any, type: string, noSafe?: boolean) => void;
|
|
404
|
+
};
|
|
405
|
+
type ExportMediaInitOptions = {
|
|
406
|
+
/**
|
|
407
|
+
* 导出类型
|
|
408
|
+
*/
|
|
409
|
+
mediaType: MediaType;
|
|
410
|
+
/**
|
|
411
|
+
* 额外画布,导出透明视频时使用
|
|
412
|
+
*/
|
|
413
|
+
extraCanvas?: HTMLCanvasElement | null;
|
|
414
|
+
/**
|
|
415
|
+
* 是否打印转码过程中的日志,仅在导出 MP4/AlphaMaskVideo 时有效, 默认 false
|
|
416
|
+
* 供开发调试使用
|
|
417
|
+
*/
|
|
418
|
+
loggerInTranscoding?: boolean;
|
|
419
|
+
/**
|
|
420
|
+
* ffmpeg 转码是否开启多线程,默认 false,确保环境支持 SharedArrayBuffer
|
|
421
|
+
*/
|
|
422
|
+
multiThreading?: boolean;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* @description SDK功能配置
|
|
427
|
+
*/
|
|
428
|
+
type SDKConfig = {
|
|
429
|
+
/**
|
|
430
|
+
* @description 页面功能配置
|
|
431
|
+
*/
|
|
432
|
+
pageConfig: PageConfig;
|
|
433
|
+
/**
|
|
434
|
+
* @description 截图功能配置
|
|
435
|
+
*/
|
|
436
|
+
screenShotConfig: ScreenShotConfig;
|
|
437
|
+
/**
|
|
438
|
+
* @description 导出视频功能配置
|
|
439
|
+
*/
|
|
440
|
+
exportVideoConfig: VideoExportConfig;
|
|
441
|
+
/**
|
|
442
|
+
* @description 尺寸自适应功能开关
|
|
443
|
+
*/
|
|
444
|
+
sizeAdaptConfig: SizeAdaptConfig;
|
|
445
|
+
/**
|
|
446
|
+
* @description 辅助面板功能配置
|
|
447
|
+
*/
|
|
448
|
+
gestureHandlerConfig: {
|
|
449
|
+
enabled: boolean;
|
|
450
|
+
adsorptionGizmoEnabled: boolean;
|
|
451
|
+
adsorptionGizmoConfig: AdsorptionGizmoConfig;
|
|
452
|
+
controlGizmoEnabled: boolean;
|
|
453
|
+
controlGizmoConfig: ControlGizmoConfig;
|
|
454
|
+
preferenceGizmoEnabled: boolean;
|
|
455
|
+
preferenceGizmoConfig: PreferenceGizmoConfig;
|
|
456
|
+
selectorGizmoEnabled: boolean;
|
|
457
|
+
selectorGizmoConfig: SelectorGizmoConfig;
|
|
458
|
+
transformGizmoEnabled: boolean;
|
|
459
|
+
transformGizmoConfig: TransformGizmoConfig;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* @description 页面功能配置
|
|
464
|
+
*/
|
|
465
|
+
type PageConfig = {
|
|
466
|
+
/**
|
|
467
|
+
* @description 同步修改功能开关
|
|
468
|
+
*/
|
|
469
|
+
asncMode: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* @description 静态预览【视图只提供播放预览功能】功能开关
|
|
472
|
+
*/
|
|
473
|
+
staticPreview: boolean;
|
|
474
|
+
/**
|
|
475
|
+
* @description 静态预览视图名称
|
|
476
|
+
*/
|
|
477
|
+
staticPreviewName: string;
|
|
478
|
+
/**
|
|
479
|
+
* @description 需过滤的元素名称
|
|
480
|
+
*/
|
|
481
|
+
filterItemNames: string[];
|
|
482
|
+
/**
|
|
483
|
+
* @description 成组操作元素显隐
|
|
484
|
+
*/
|
|
485
|
+
groupVisible: boolean;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* @description 视频导出功能配置
|
|
489
|
+
*/
|
|
490
|
+
type VideoExportConfig = {
|
|
491
|
+
enabled: boolean;
|
|
492
|
+
} & ExportMediaInitOptions;
|
|
493
|
+
/**
|
|
494
|
+
* @description 截图功能配置
|
|
495
|
+
*/
|
|
496
|
+
type ScreenShotConfig = {
|
|
497
|
+
enabled: boolean;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* @description 尺寸自适应功能配置
|
|
501
|
+
*/
|
|
502
|
+
type SizeAdaptConfig = {
|
|
503
|
+
enabled: boolean;
|
|
504
|
+
};
|
|
505
|
+
/**
|
|
506
|
+
* @description 对齐吸附功能参数
|
|
507
|
+
*/
|
|
508
|
+
type AdsorptionGizmoConfig = {
|
|
509
|
+
/**
|
|
510
|
+
* @description 对齐吸附线宽
|
|
511
|
+
*/
|
|
512
|
+
lineWidth: number;
|
|
513
|
+
/**
|
|
514
|
+
* @description 对齐线颜色
|
|
515
|
+
*/
|
|
516
|
+
lineColor: number;
|
|
517
|
+
/**
|
|
518
|
+
* @description 对齐吸附距离
|
|
519
|
+
*/
|
|
520
|
+
distance: number;
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* @description 视图控制功能参数
|
|
524
|
+
*/
|
|
525
|
+
type ControlGizmoConfig = {
|
|
526
|
+
/**
|
|
527
|
+
* @description 缩放步长
|
|
528
|
+
*/
|
|
529
|
+
zoomStep: number;
|
|
530
|
+
};
|
|
531
|
+
/**
|
|
532
|
+
* @description 视口展示功能参数
|
|
533
|
+
*/
|
|
534
|
+
type PreferenceGizmoConfig = {
|
|
535
|
+
/**
|
|
536
|
+
* @description 视口窗包围盒颜色
|
|
537
|
+
*/
|
|
538
|
+
boxColor: number;
|
|
539
|
+
/**
|
|
540
|
+
* @description 视口窗包围盒宽度
|
|
541
|
+
*/
|
|
542
|
+
boxWidth: number;
|
|
543
|
+
/**
|
|
544
|
+
* @description 视口区域外遮罩颜色
|
|
545
|
+
*/
|
|
546
|
+
markColor: number;
|
|
547
|
+
/**
|
|
548
|
+
* @description 视口区域外遮罩透明度
|
|
549
|
+
*/
|
|
550
|
+
markAlpha: number;
|
|
551
|
+
/**
|
|
552
|
+
* @description 出血区预览开关
|
|
553
|
+
*/
|
|
554
|
+
safeAreaEnabled: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* @description 出血区颜色
|
|
557
|
+
*/
|
|
558
|
+
safeAreaBoxColor: number;
|
|
559
|
+
/**
|
|
560
|
+
* @description 出血区透明度
|
|
561
|
+
*/
|
|
562
|
+
safeAreaBoxAlpha: number;
|
|
563
|
+
};
|
|
564
|
+
/**
|
|
565
|
+
* @description 选择功能参数
|
|
566
|
+
*/
|
|
567
|
+
type SelectorGizmoConfig = {
|
|
568
|
+
/**
|
|
569
|
+
* @description 预选框线宽
|
|
570
|
+
*/
|
|
571
|
+
preSelectedWidth: number;
|
|
572
|
+
/**
|
|
573
|
+
* @description 预选框颜色
|
|
574
|
+
*/
|
|
575
|
+
preSelectedColor: number;
|
|
576
|
+
/**
|
|
577
|
+
* @description 框选区域颜色
|
|
578
|
+
*/
|
|
579
|
+
regionBoxColor: number;
|
|
580
|
+
/**
|
|
581
|
+
* @description 框选区域透明度
|
|
582
|
+
*/
|
|
583
|
+
regionBoxAlpha: number;
|
|
584
|
+
/**
|
|
585
|
+
* @description 框选区域包围框颜色
|
|
586
|
+
*/
|
|
587
|
+
regionWireframeColor: number;
|
|
588
|
+
/**
|
|
589
|
+
* @description 框选区域包围框透明度
|
|
590
|
+
*/
|
|
591
|
+
regionWireframeAlpha: number;
|
|
592
|
+
/**
|
|
593
|
+
* @description 框选区域包围框宽度
|
|
594
|
+
*/
|
|
595
|
+
regionWireframeWidth: number;
|
|
596
|
+
};
|
|
597
|
+
/**
|
|
598
|
+
* @description 变换功能参数
|
|
599
|
+
*/
|
|
600
|
+
type TransformGizmoConfig = {
|
|
601
|
+
/**
|
|
602
|
+
* @description 变换交互框颜色
|
|
603
|
+
*/
|
|
604
|
+
wireframeColor: number;
|
|
605
|
+
/**
|
|
606
|
+
* @description 变换交互框透明度
|
|
607
|
+
*/
|
|
608
|
+
wireframeAlpha: number;
|
|
609
|
+
/**
|
|
610
|
+
* @description 变换交互框宽度
|
|
611
|
+
*/
|
|
612
|
+
wireframeWidth: number;
|
|
613
|
+
/**
|
|
614
|
+
* @description 变换交互框角点填充色
|
|
615
|
+
*/
|
|
616
|
+
cornerFillColor: number;
|
|
617
|
+
/**
|
|
618
|
+
* @description 变换交互框角点线框色
|
|
619
|
+
*/
|
|
620
|
+
cornerLineColor: number;
|
|
621
|
+
/**
|
|
622
|
+
* @description 变换交互框角点线框宽度
|
|
623
|
+
*/
|
|
624
|
+
cornerLineWidth: number;
|
|
625
|
+
/**
|
|
626
|
+
* @description 变换交互框角点线框透明度
|
|
627
|
+
*/
|
|
628
|
+
cornerLineAlpha: number;
|
|
629
|
+
/**
|
|
630
|
+
* @description 交互框缩放圆半径
|
|
631
|
+
*/
|
|
632
|
+
scaleCircleSize: number;
|
|
633
|
+
/**
|
|
634
|
+
* @description 交互框旋转圆半径
|
|
635
|
+
*/
|
|
636
|
+
rotationCircleSize: number;
|
|
637
|
+
};
|
|
638
|
+
|
|
415
639
|
type SDKEvents = {
|
|
416
640
|
'selectedItemChange': [id: string[]];
|
|
417
641
|
'preSelectedItemChange': [id: string | undefined];
|
|
@@ -430,26 +654,27 @@ type SDKEvents = {
|
|
|
430
654
|
}];
|
|
431
655
|
'exportProgress': [progress?: number];
|
|
432
656
|
'exportComplete': [success: boolean];
|
|
657
|
+
'sdkConfigChange': [preSDKConfig: SDKConfig, curSDKConfig: SDKConfig];
|
|
433
658
|
};
|
|
434
659
|
declare class SDK {
|
|
660
|
+
static config: SDKConfig;
|
|
435
661
|
private _eventEmitter;
|
|
436
662
|
private _pageData;
|
|
437
|
-
private
|
|
438
|
-
private
|
|
439
|
-
private
|
|
440
|
-
private
|
|
663
|
+
private _screenShot;
|
|
664
|
+
private _exporter;
|
|
665
|
+
private _pageDataUtils;
|
|
666
|
+
private _sizeAdapt;
|
|
441
667
|
private _gestureHandler;
|
|
442
|
-
private _playerContainer;
|
|
443
|
-
private _exportStatus;
|
|
444
668
|
private disposables;
|
|
445
669
|
private _isSwitchScene;
|
|
446
670
|
player: Player;
|
|
447
|
-
|
|
671
|
+
private _playerContainer;
|
|
672
|
+
constructor(container: HTMLElement);
|
|
448
673
|
get pageData(): PageData | undefined;
|
|
449
|
-
get exportStatus():
|
|
674
|
+
get exportStatus(): string;
|
|
450
675
|
private get exportOptions();
|
|
451
676
|
dispose(): void;
|
|
452
|
-
on: <E extends "progress" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportComplete">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
677
|
+
on: <E extends "progress" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportComplete" | "sdkConfigChange">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
|
|
453
678
|
private getInitParam;
|
|
454
679
|
private initSDK;
|
|
455
680
|
run(param: SDKInputParam): Promise<void>;
|
|
@@ -471,7 +696,7 @@ declare class SDK {
|
|
|
471
696
|
*/
|
|
472
697
|
getItemPropertyValue<T extends keyof PageFormTypeAndPropertyReference, N extends keyof PageFormTypeAndPropertyReference[T]>(param: GetItemPropertyValueParam<T, N>): GetItemPropertyValueResult<T, N> | undefined;
|
|
473
698
|
setItemPropertyValue(param: SetItemPropertyValueParam): Promise<void>;
|
|
474
|
-
generateScreenShot(id: number, size?: [number, number], tick?: number): Promise<string>;
|
|
699
|
+
generateScreenShot(id: number, size?: [number, number], tick?: number): Promise<string | undefined>;
|
|
475
700
|
/**
|
|
476
701
|
* @description 切换场景
|
|
477
702
|
* @param index 场景索引
|
|
@@ -481,12 +706,12 @@ declare class SDK {
|
|
|
481
706
|
* @description 获取页面的 safeAreaPreview、zoom、adsorption 值
|
|
482
707
|
* @returns 页面的 safeAreaPreview、zoom、adsorption 值
|
|
483
708
|
*/
|
|
484
|
-
getConfig(): PageConfig;
|
|
709
|
+
getConfig(): PageConfig$1;
|
|
485
710
|
/**
|
|
486
711
|
* 设置页面的 safeAreaPreview、zoom、adsorption 值
|
|
487
712
|
* @param pageProperty 设置
|
|
488
713
|
*/
|
|
489
|
-
setConfig(pageConfig: PageConfig): void;
|
|
714
|
+
setConfig(pageConfig: PageConfig$1): void;
|
|
490
715
|
/**
|
|
491
716
|
* @description 设置播放进度
|
|
492
717
|
* @param progress 播放进度 0-100
|
|
@@ -500,24 +725,102 @@ declare class SDK {
|
|
|
500
725
|
*/
|
|
501
726
|
getViewThumbnail(): {
|
|
502
727
|
id: number;
|
|
503
|
-
thumbnail: string
|
|
728
|
+
thumbnail: Promise<string | undefined>;
|
|
504
729
|
}[];
|
|
505
730
|
private destroyCompositions;
|
|
506
|
-
private onExportProgress;
|
|
507
|
-
private onExportFinish;
|
|
508
|
-
private onExportError;
|
|
509
731
|
/**
|
|
510
|
-
* @description
|
|
732
|
+
* @description 导出,支持导出媒体或其他,如MP4,未来支持 JSON 等;
|
|
511
733
|
*/
|
|
512
|
-
|
|
513
|
-
|
|
734
|
+
onExport(): void;
|
|
735
|
+
/**
|
|
736
|
+
* @description 取消导出
|
|
737
|
+
*/
|
|
738
|
+
cancelExport(): void;
|
|
514
739
|
loadPageData(data: PageData): Promise<void>;
|
|
515
740
|
runByPageData(data: PageData): Promise<void>;
|
|
516
741
|
reloadPageDataByScene(scene: string | spec.JSONScene): Promise<void>;
|
|
517
|
-
setPageBackgroundColor(color: [number, number, number, number]): void;
|
|
518
742
|
addViewParams(viewParams: ViewParam[]): Promise<void>;
|
|
519
743
|
deleteViewParams(ids: number[]): void;
|
|
520
744
|
setExportParam(exportParam: ExportParam, id?: number): void;
|
|
745
|
+
/**
|
|
746
|
+
* @description 设置视图缩放
|
|
747
|
+
* @param zoom 缩放值
|
|
748
|
+
*/
|
|
749
|
+
setPageZoom(zoom: number): void;
|
|
750
|
+
/**
|
|
751
|
+
* @description 设置静态预览功能开关
|
|
752
|
+
* @param enabled 功能开关
|
|
753
|
+
*/
|
|
754
|
+
setStaticPreviewEnabled(enabled: boolean): void;
|
|
755
|
+
/**
|
|
756
|
+
* @description 设置静态预览视图名称
|
|
757
|
+
* @param name 视图名称
|
|
758
|
+
*/
|
|
759
|
+
setStaticPreviewName(name: string): void;
|
|
760
|
+
/**
|
|
761
|
+
* @description 设置同步修改功能开关
|
|
762
|
+
* @param enabled 功能开关
|
|
763
|
+
*/
|
|
764
|
+
setAsyncEnabled(enabled: boolean): void;
|
|
765
|
+
/**
|
|
766
|
+
* @description 设置 成组显影 开关
|
|
767
|
+
*/
|
|
768
|
+
setGroupVisibleEnabled(enabled: boolean): void;
|
|
769
|
+
/**
|
|
770
|
+
* @description 新增过滤元素名称
|
|
771
|
+
* @param itemNames 过滤元素名称
|
|
772
|
+
*/
|
|
773
|
+
addFilterItemNames(itemNames: string[] | string): void;
|
|
774
|
+
/**
|
|
775
|
+
* @description 设置预览辅助层颜色
|
|
776
|
+
* @param color 色值
|
|
777
|
+
*/
|
|
778
|
+
setPreferenceBackgroundColor(color: [number, number, number, number]): void;
|
|
779
|
+
/**
|
|
780
|
+
* @description 设置出血区颜色
|
|
781
|
+
* @param color 色值
|
|
782
|
+
*/
|
|
783
|
+
setSafeAreaColor(color: [number, number, number, number]): void;
|
|
784
|
+
/**
|
|
785
|
+
* @description 设置 尺寸自适应拓展 功能开关
|
|
786
|
+
* @param enabled 功能开关
|
|
787
|
+
*/
|
|
788
|
+
setSizeAdaptEnabled(enabled: boolean): void;
|
|
789
|
+
/**
|
|
790
|
+
* @description 设置 截图 功能开关
|
|
791
|
+
* @param enabled 功能开关
|
|
792
|
+
*/
|
|
793
|
+
setScreenShotEnabled(enabled: boolean): void;
|
|
794
|
+
/**
|
|
795
|
+
* @description 设置 导出 功能开关
|
|
796
|
+
* @param enabled
|
|
797
|
+
*/
|
|
798
|
+
setExportVideoEnabled(enabled: boolean): void;
|
|
799
|
+
/**
|
|
800
|
+
* @description 设置预选框参数
|
|
801
|
+
* @param preSelectedColor 预选框颜色
|
|
802
|
+
* @param preSelectedWidth 预选框线框宽度
|
|
803
|
+
*/
|
|
804
|
+
setSelectorGizmoPreSelectConfig(preSelectedColor?: number, preSelectedWidth?: number): void;
|
|
805
|
+
/**
|
|
806
|
+
* @description 设置 变换控制器 交互框参数
|
|
807
|
+
* @param config 参数
|
|
808
|
+
*/
|
|
809
|
+
setTranformGizmoWireframeConfig(config: {
|
|
810
|
+
wireframeColor?: number;
|
|
811
|
+
wireframeAlpha?: number;
|
|
812
|
+
wireframeWidth?: number;
|
|
813
|
+
}): void;
|
|
814
|
+
/**
|
|
815
|
+
* @description 获取 SDK 配置参数
|
|
816
|
+
* @returns SDK 配置参数
|
|
817
|
+
*/
|
|
818
|
+
getSDKConfig(): SDKConfig;
|
|
819
|
+
/**
|
|
820
|
+
* @description 设置 SDK 配置参数
|
|
821
|
+
* @param config SDK 配置参数
|
|
822
|
+
*/
|
|
823
|
+
setSDKConfig(config: SDKConfig): void;
|
|
521
824
|
}
|
|
522
825
|
|
|
523
|
-
export { type ActiveData, type BaseFormProperty, type
|
|
826
|
+
export { type ActiveData, type BaseFormProperty, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteFormProperty, type TextFormProperty, type ViewItem, type ViewParam, type ViewProperty };
|