@vvfx/sdk 0.1.19-alpha.34 → 0.1.19-alpha.36

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
@@ -3086,7 +3086,7 @@ declare class SDK {
3086
3086
  getItemLockState(id: string): boolean;
3087
3087
  openItemCreateGizmo(type: ItemCreateType): void;
3088
3088
  closeItemCreateGizmo(): void;
3089
- openTextGizmo(textItemId?: string): void;
3089
+ openTextGizmo(textItemId?: string, mode?: 'select' | 'focus'): void;
3090
3090
  closeTextGizmo(): void;
3091
3091
  setItemName(id: string, name: string): void;
3092
3092
  setSafeAreaPreviewVisible(id: number, type: 'url' | 'color', visible: boolean): void;
@@ -3395,6 +3395,12 @@ declare class PageDataUtils {
3395
3395
  * @description 获取当前激活的场景
3396
3396
  */
3397
3397
  private getActiveTargetScene;
3398
+ /**
3399
+ * @description 获取场景主合成的 previewSize
3400
+ * @param scene 可选,未传时取当前激活视图场景
3401
+ * @returns 主合成的 previewSize;场景/主合成/previewSize 任一不存在时返回 undefined
3402
+ */
3403
+ getSceneSize(scene?: spec.JSONScene): Vector2 | undefined;
3398
3404
  /**
3399
3405
  * @private
3400
3406
  * @description 刷新场景和页面数据
@@ -3638,6 +3644,11 @@ declare class InteractionUtils {
3638
3644
  * @param targetItem 目标元素
3639
3645
  */
3640
3646
  getWorldSizeByViewSize(viewSize: Vector2, isWorld?: boolean, itemId?: string): Vector3;
3647
+ /**
3648
+ * @description 获取 template 模式下视图与场景的缩放比 (viewportWidth / sceneWidth)
3649
+ * 场景未就绪时回退到 1,并打印一次 warning
3650
+ */
3651
+ private getTemplateViewScale;
3641
3652
  getViewSizeByPixelSize(pixelSize: Vector2): Vector2;
3642
3653
  /**
3643
3654
  * @description 对空间坐标进行投影
package/dist/index.d.ts CHANGED
@@ -3086,7 +3086,7 @@ declare class SDK {
3086
3086
  getItemLockState(id: string): boolean;
3087
3087
  openItemCreateGizmo(type: ItemCreateType): void;
3088
3088
  closeItemCreateGizmo(): void;
3089
- openTextGizmo(textItemId?: string): void;
3089
+ openTextGizmo(textItemId?: string, mode?: 'select' | 'focus'): void;
3090
3090
  closeTextGizmo(): void;
3091
3091
  setItemName(id: string, name: string): void;
3092
3092
  setSafeAreaPreviewVisible(id: number, type: 'url' | 'color', visible: boolean): void;
@@ -3395,6 +3395,12 @@ declare class PageDataUtils {
3395
3395
  * @description 获取当前激活的场景
3396
3396
  */
3397
3397
  private getActiveTargetScene;
3398
+ /**
3399
+ * @description 获取场景主合成的 previewSize
3400
+ * @param scene 可选,未传时取当前激活视图场景
3401
+ * @returns 主合成的 previewSize;场景/主合成/previewSize 任一不存在时返回 undefined
3402
+ */
3403
+ getSceneSize(scene?: spec.JSONScene): Vector2 | undefined;
3398
3404
  /**
3399
3405
  * @private
3400
3406
  * @description 刷新场景和页面数据
@@ -3638,6 +3644,11 @@ declare class InteractionUtils {
3638
3644
  * @param targetItem 目标元素
3639
3645
  */
3640
3646
  getWorldSizeByViewSize(viewSize: Vector2, isWorld?: boolean, itemId?: string): Vector3;
3647
+ /**
3648
+ * @description 获取 template 模式下视图与场景的缩放比 (viewportWidth / sceneWidth)
3649
+ * 场景未就绪时回退到 1,并打印一次 warning
3650
+ */
3651
+ private getTemplateViewScale;
3641
3652
  getViewSizeByPixelSize(pixelSize: Vector2): Vector2;
3642
3653
  /**
3643
3654
  * @description 对空间坐标进行投影