@vvfx/sdk 0.0.0-alpha.40 → 0.0.0-alpha.41

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.d.cts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _galacean_effects from '@galacean/effects';
2
2
  import { spec, Player } from '@galacean/effects';
3
- export { spec } from '@galacean/effects';
3
+ export { generateGUID, spec } from '@galacean/effects';
4
4
 
5
5
  type ViewItemTypedProperty = {
6
6
  [K in keyof PageFormTypeAndPropertyReference]: {
@@ -222,7 +222,7 @@ type SDKConfig = {
222
222
  /**
223
223
  * @description 导出视频功能配置
224
224
  */
225
- exportVideoConfig: VideoExportConfig;
225
+ exportConfig: ExportConfig;
226
226
  /**
227
227
  * @description 尺寸自适应功能开关
228
228
  */
@@ -272,7 +272,7 @@ type PageConfig$1 = {
272
272
  /**
273
273
  * @description 视频导出功能配置
274
274
  */
275
- type VideoExportConfig = {
275
+ type ExportConfig = {
276
276
  enabled: boolean;
277
277
  } & ExportMediaInitOptions;
278
278
  /**
@@ -463,6 +463,12 @@ declare class SDK {
463
463
  dispose(): void;
464
464
  on: <E extends "progress" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
465
465
  private getInitParam;
466
+ /**
467
+ * 检测导出是否需要重新初始化
468
+ * @param preExportVideoConfig
469
+ * @param curExportVideoConfig
470
+ */
471
+ private checkExporter;
466
472
  private initExporter;
467
473
  private initSDK;
468
474
  run(param: SDKInputParam): Promise<void>;
@@ -537,7 +543,7 @@ declare class SDK {
537
543
  reloadPageDataByScene(scene: string | spec.JSONScene): Promise<void>;
538
544
  addViewParams(viewParams: ViewParam[]): Promise<void>;
539
545
  deleteViewParams(ids: number[]): Promise<void>;
540
- setExportParam(exportParam: ExportParam, id?: number): void;
546
+ setExportParam(exportParam: Partial<ExportParam>, id?: number): void;
541
547
  /**
542
548
  * @description 设置视图缩放
543
549
  * @param zoom 缩放值
@@ -588,10 +594,10 @@ declare class SDK {
588
594
  */
589
595
  setScreenShotEnabled(enabled: boolean): void;
590
596
  /**
591
- * @description 设置 导出 功能开关
592
- * @param enabled
597
+ * @description 设置导出功能初始化配置
598
+ * @param exportConfig
593
599
  */
594
- setExportVideoEnabled(enabled: boolean): void;
600
+ setExportConfig(exportConfig: ExportConfig): void;
595
601
  /**
596
602
  * @description 设置预选框参数
597
603
  * @param preSelectedColor 预选框颜色
@@ -837,10 +843,6 @@ type ViewParam = {
837
843
  * @description 导出参数
838
844
  */
839
845
  type ExportParam = {
840
- /**
841
- * @description 导出视频类型 - 预留参数
842
- */
843
- type?: string;
844
846
  /**
845
847
  * @description 视频名称
846
848
  */
@@ -977,4 +979,4 @@ type SpriteCreateInfo = {
977
979
  position: spec.vec2;
978
980
  };
979
981
 
980
- 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 };
982
+ export { type ActiveData, type BaseFormProperty, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextFormProperty, type ViewItem, type ViewParam, type ViewProperty };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _galacean_effects from '@galacean/effects';
2
2
  import { spec, Player } from '@galacean/effects';
3
- export { spec } from '@galacean/effects';
3
+ export { generateGUID, spec } from '@galacean/effects';
4
4
 
5
5
  type ViewItemTypedProperty = {
6
6
  [K in keyof PageFormTypeAndPropertyReference]: {
@@ -222,7 +222,7 @@ type SDKConfig = {
222
222
  /**
223
223
  * @description 导出视频功能配置
224
224
  */
225
- exportVideoConfig: VideoExportConfig;
225
+ exportConfig: ExportConfig;
226
226
  /**
227
227
  * @description 尺寸自适应功能开关
228
228
  */
@@ -272,7 +272,7 @@ type PageConfig$1 = {
272
272
  /**
273
273
  * @description 视频导出功能配置
274
274
  */
275
- type VideoExportConfig = {
275
+ type ExportConfig = {
276
276
  enabled: boolean;
277
277
  } & ExportMediaInitOptions;
278
278
  /**
@@ -463,6 +463,12 @@ declare class SDK {
463
463
  dispose(): void;
464
464
  on: <E extends "progress" | "selectedItemChange" | "preSelectedItemChange" | "selectedViewChange" | "pageDataChange" | "zoomChange" | "itemPropertyChange" | "exportProgress" | "exportDone" | "exportComplete" | "sdkConfigChange">(eventName: E, listener: _galacean_effects.EventEmitterListener<SDKEvents[E]>, options?: _galacean_effects.EventEmitterOptions) => () => void;
465
465
  private getInitParam;
466
+ /**
467
+ * 检测导出是否需要重新初始化
468
+ * @param preExportVideoConfig
469
+ * @param curExportVideoConfig
470
+ */
471
+ private checkExporter;
466
472
  private initExporter;
467
473
  private initSDK;
468
474
  run(param: SDKInputParam): Promise<void>;
@@ -537,7 +543,7 @@ declare class SDK {
537
543
  reloadPageDataByScene(scene: string | spec.JSONScene): Promise<void>;
538
544
  addViewParams(viewParams: ViewParam[]): Promise<void>;
539
545
  deleteViewParams(ids: number[]): Promise<void>;
540
- setExportParam(exportParam: ExportParam, id?: number): void;
546
+ setExportParam(exportParam: Partial<ExportParam>, id?: number): void;
541
547
  /**
542
548
  * @description 设置视图缩放
543
549
  * @param zoom 缩放值
@@ -588,10 +594,10 @@ declare class SDK {
588
594
  */
589
595
  setScreenShotEnabled(enabled: boolean): void;
590
596
  /**
591
- * @description 设置 导出 功能开关
592
- * @param enabled
597
+ * @description 设置导出功能初始化配置
598
+ * @param exportConfig
593
599
  */
594
- setExportVideoEnabled(enabled: boolean): void;
600
+ setExportConfig(exportConfig: ExportConfig): void;
595
601
  /**
596
602
  * @description 设置预选框参数
597
603
  * @param preSelectedColor 预选框颜色
@@ -837,10 +843,6 @@ type ViewParam = {
837
843
  * @description 导出参数
838
844
  */
839
845
  type ExportParam = {
840
- /**
841
- * @description 导出视频类型 - 预留参数
842
- */
843
- type?: string;
844
846
  /**
845
847
  * @description 视频名称
846
848
  */
@@ -977,4 +979,4 @@ type SpriteCreateInfo = {
977
979
  position: spec.vec2;
978
980
  };
979
981
 
980
- 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 };
982
+ export { type ActiveData, type BaseFormProperty, type PageData, type PageFormTypedProperty, type PageProperty, SDK, type SDKEvents, type SDKInputParam, type SDKOptions, type SpecificPageFormProps, type SpriteCreateInfo, type SpriteFormProperty, type TextFormProperty, type ViewItem, type ViewParam, type ViewProperty };