@vvfx/sdk 0.1.8 → 0.1.9-alpha.1

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,5 +1,5 @@
1
1
  import * as _galacean_effects from '@galacean/effects';
2
- import { spec, math, Player } from '@galacean/effects';
2
+ import { spec, math, Texture, Player } from '@galacean/effects';
3
3
  export { generateGUID, spec } from '@galacean/effects';
4
4
  import { Point } from '@pixi/constants';
5
5
 
@@ -561,6 +561,10 @@ type SDKConfig = {
561
561
  * @description 页面功能配置
562
562
  */
563
563
  pageConfig: PageConfig$1;
564
+ /**
565
+ * @description 异步加载功能配置
566
+ */
567
+ asyncLoadConfig: AsyncLoadConfig;
564
568
  /**
565
569
  * @description 截图功能配置
566
570
  */
@@ -635,6 +639,14 @@ type PageConfig$1 = {
635
639
  */
636
640
  minZoom: number;
637
641
  };
642
+ /**
643
+ * @description 异步加载配置
644
+ */
645
+ type AsyncLoadConfig = {
646
+ enabled: boolean;
647
+ loadingTextureUrl: string;
648
+ loadingTexture?: Texture;
649
+ };
638
650
  /**
639
651
  * @description 视频导出功能配置
640
652
  */
@@ -1200,6 +1212,7 @@ type SpriteTextInitInfo = {
1200
1212
  box: [spec.vec2, spec.vec2, spec.vec2, spec.vec2];
1201
1213
  };
1202
1214
  type GizmoType = 'null' | 'selector' | 'transform' | 'control' | 'adsorption' | 'preference' | 'picture-cut' | 'text' | 'mask' | 'loading' | 'picture-expand' | 'sprite-text-edit' | 'video-play';
1215
+ type GestureHandlerInteractType = 'select' | 'hand';
1203
1216
 
1204
1217
  declare module '@pixi/graphics' {
1205
1218
  interface Graphics {
@@ -1458,8 +1471,8 @@ declare class SDK {
1458
1471
  * @description 创建图层元素
1459
1472
  * @param spriteInfo 图层元素信息
1460
1473
  */
1461
- addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1462
- addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1474
+ addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string>;
1475
+ addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string>;
1463
1476
  openPictureCutGizmo(): void;
1464
1477
  closePictureCutGizmo(): void;
1465
1478
  getCutInfo(): {
@@ -1487,6 +1500,7 @@ declare class SDK {
1487
1500
  */
1488
1501
  groupItems(nullInfo: NullCreateInfo, scene?: spec.JSONScene): string | undefined;
1489
1502
  addTextItem(textInfo: TextCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1503
+ addItemByCreateInfos(createInfos: ItemCreateInfo[], asyncMode?: boolean): Promise<string[]>;
1490
1504
  deleteItems(idInfo: string | string[]): void;
1491
1505
  getItemCreateInfo(idInfo: string | string[]): ItemCreateInfo[];
1492
1506
  createScreenShotSceneByIds(idInfo: string | string[], time?: number): Promise<string | undefined>;
@@ -1553,6 +1567,7 @@ declare class SDK {
1553
1567
  setVideoItemPlayTime(id: string, time: number): void;
1554
1568
  getPixelPositionByViewPosition(viewPosition: Vector2): Vector2;
1555
1569
  hitTest(x: number, y: number): string[] | undefined;
1570
+ setGestureInteractType(type: GestureHandlerInteractType): void;
1556
1571
  }
1557
1572
 
1558
1573
  type SizeAdaptDirection = 'x' | 'y';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _galacean_effects from '@galacean/effects';
2
- import { spec, math, Player } from '@galacean/effects';
2
+ import { spec, math, Texture, Player } from '@galacean/effects';
3
3
  export { generateGUID, spec } from '@galacean/effects';
4
4
  import { Point } from '@pixi/constants';
5
5
 
@@ -561,6 +561,10 @@ type SDKConfig = {
561
561
  * @description 页面功能配置
562
562
  */
563
563
  pageConfig: PageConfig$1;
564
+ /**
565
+ * @description 异步加载功能配置
566
+ */
567
+ asyncLoadConfig: AsyncLoadConfig;
564
568
  /**
565
569
  * @description 截图功能配置
566
570
  */
@@ -635,6 +639,14 @@ type PageConfig$1 = {
635
639
  */
636
640
  minZoom: number;
637
641
  };
642
+ /**
643
+ * @description 异步加载配置
644
+ */
645
+ type AsyncLoadConfig = {
646
+ enabled: boolean;
647
+ loadingTextureUrl: string;
648
+ loadingTexture?: Texture;
649
+ };
638
650
  /**
639
651
  * @description 视频导出功能配置
640
652
  */
@@ -1200,6 +1212,7 @@ type SpriteTextInitInfo = {
1200
1212
  box: [spec.vec2, spec.vec2, spec.vec2, spec.vec2];
1201
1213
  };
1202
1214
  type GizmoType = 'null' | 'selector' | 'transform' | 'control' | 'adsorption' | 'preference' | 'picture-cut' | 'text' | 'mask' | 'loading' | 'picture-expand' | 'sprite-text-edit' | 'video-play';
1215
+ type GestureHandlerInteractType = 'select' | 'hand';
1203
1216
 
1204
1217
  declare module '@pixi/graphics' {
1205
1218
  interface Graphics {
@@ -1458,8 +1471,8 @@ declare class SDK {
1458
1471
  * @description 创建图层元素
1459
1472
  * @param spriteInfo 图层元素信息
1460
1473
  */
1461
- addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1462
- addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1474
+ addSpriteItem(spriteInfo: SpriteCreateInfo, scene?: spec.JSONScene): Promise<string>;
1475
+ addVideoItem(videoInfo: VideoCreateInfo, scene?: spec.JSONScene): Promise<string>;
1463
1476
  openPictureCutGizmo(): void;
1464
1477
  closePictureCutGizmo(): void;
1465
1478
  getCutInfo(): {
@@ -1487,6 +1500,7 @@ declare class SDK {
1487
1500
  */
1488
1501
  groupItems(nullInfo: NullCreateInfo, scene?: spec.JSONScene): string | undefined;
1489
1502
  addTextItem(textInfo: TextCreateInfo, scene?: spec.JSONScene): Promise<string | undefined>;
1503
+ addItemByCreateInfos(createInfos: ItemCreateInfo[], asyncMode?: boolean): Promise<string[]>;
1490
1504
  deleteItems(idInfo: string | string[]): void;
1491
1505
  getItemCreateInfo(idInfo: string | string[]): ItemCreateInfo[];
1492
1506
  createScreenShotSceneByIds(idInfo: string | string[], time?: number): Promise<string | undefined>;
@@ -1553,6 +1567,7 @@ declare class SDK {
1553
1567
  setVideoItemPlayTime(id: string, time: number): void;
1554
1568
  getPixelPositionByViewPosition(viewPosition: Vector2): Vector2;
1555
1569
  hitTest(x: number, y: number): string[] | undefined;
1570
+ setGestureInteractType(type: GestureHandlerInteractType): void;
1556
1571
  }
1557
1572
 
1558
1573
  type SizeAdaptDirection = 'x' | 'y';