iflow-engine-base 3.9.20 → 3.9.21

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.ts CHANGED
@@ -1611,6 +1611,14 @@ declare class EngineKernel2d {
1611
1611
  enableChunkedLoading?: boolean;
1612
1612
  enableValidation?: boolean;
1613
1613
  }): Promise<{}>;
1614
+ /**
1615
+ * 通过 viewToken 向 OpenAPI 解析真实加载地址,再复用现有 2D URL 加载逻辑。
1616
+ */
1617
+ loadModelByViewToken(viewToken: string, options?: {
1618
+ chunkSize?: number;
1619
+ enableChunkedLoading?: boolean;
1620
+ enableValidation?: boolean;
1621
+ }): Promise<{}>;
1614
1622
  /** 获取当前 2D 图纸中可切换的布局空间列表。 */
1615
1623
  getLayouts(): LoadedLayoutSpace2d[];
1616
1624
  /** 获取当前激活的工作空间,供外部状态栏或自定义 UI 同步显示。 */
@@ -1744,6 +1752,7 @@ declare class EngineKernel2d {
1744
1752
  * 提供 720° 全景图查看和标注功能
1745
1753
  */
1746
1754
  declare class EngineKernel720 {
1755
+ private readonly options;
1747
1756
  sceneModule: SceneModule720;
1748
1757
  cameraModule: CameraModule720;
1749
1758
  renderModule: RenderModule720;
@@ -1768,6 +1777,10 @@ declare class EngineKernel720 {
1768
1777
  * @param imageUrl 全景图 URL(png, jpg)
1769
1778
  */
1770
1779
  loadPanorama(imageUrl: string): Promise<void>;
1780
+ /**
1781
+ * 通过 viewToken 解析全景资源地址,再复用现有全景加载逻辑。
1782
+ */
1783
+ loadPanoramaByViewToken(viewToken: string): Promise<void>;
1771
1784
  /**
1772
1785
  * 预加载多个全景图
1773
1786
  * @param urls 全景图 URL 数组
@@ -1885,10 +1898,15 @@ declare class EngineKernelGaussian {
1885
1898
  controlModule: ControlModuleGaussian;
1886
1899
  loaderModule: LoaderModuleGaussian;
1887
1900
  private isInitialized;
1901
+ private readonly options;
1888
1902
  private readonly version;
1889
1903
  constructor(options: EngineGaussianOptions);
1890
1904
  private initialize;
1891
1905
  loadModel(url: string, options?: GaussianSceneOptions): Promise<GaussianSceneInfo>;
1906
+ /**
1907
+ * 通过 viewToken 解析 Gaussian 资源地址,再复用现有 URL 加载逻辑。
1908
+ */
1909
+ loadModelByViewToken(viewToken: string, options?: GaussianSceneOptions): Promise<GaussianSceneInfo>;
1892
1910
  unloadModel(id: string): Promise<void>;
1893
1911
  setOrientationPreset(preset: GaussianOrientationPreset): void;
1894
1912
  getOrientationPreset(): GaussianOrientationPreset;
@@ -1909,6 +1927,7 @@ declare class EngineKernelGaussian {
1909
1927
  * 当前默认封装 Cesium Viewer,提供基础地图查看和相机控制能力。
1910
1928
  */
1911
1929
  export declare class EngineKernelGIS {
1930
+ private readonly options;
1912
1931
  eventModule: EventModuleGIS;
1913
1932
  viewerModule: ViewerModuleGIS;
1914
1933
  modelManager: ModelLoadManagerGIS;
@@ -1976,6 +1995,31 @@ export declare class EngineKernelGIS {
1976
1995
  * 加载 GeoJSON 数据。
1977
1996
  */
1978
1997
  loadGeoJson(options: GISGeoJsonLoadOptions): Promise<GISLoadedModel>;
1998
+ /**
1999
+ * 通过 viewToken 解析 GIS 模型地址,并按返回格式复用现有 GIS 加载能力。
2000
+ */
2001
+ loadModelByViewToken(viewToken: string, options?: Omit<GIS3DTilesLoadOptions, 'url'>): Promise<GISLoadedModel>;
2002
+ /**
2003
+ * GIS 场景本身没有单一模型 URL,resolve 返回的 info 会携带子模型清单与定位信息。
2004
+ */
2005
+ private loadGisSceneByResolvedInfo;
2006
+ /**
2007
+ * 只接受标准 GIS 场景 info 结构;旧数据缺失时继续走单模型 URL 回退逻辑。
2008
+ */
2009
+ private parseResolvedGisSceneInfo;
2010
+ private hasResolvedSceneSource;
2011
+ private loadResolvedGisSceneModel;
2012
+ private applyResolvedSceneCalibration;
2013
+ private createResolvedSceneCalibrationOptions;
2014
+ private getTilesetCartographicBySource;
2015
+ private normalizeResolvedModelType;
2016
+ private resolveSceneModelUrl;
2017
+ private resolveTilesetSceneUrl;
2018
+ private resolveResolvedModelPosition;
2019
+ private normalizeSceneRotation;
2020
+ private toResolvedModelId;
2021
+ private toResolvedModelName;
2022
+ private toFiniteNumber;
1979
2023
  /**
1980
2024
  * 移除指定模型。
1981
2025
  */
@@ -2127,6 +2171,10 @@ declare class EngineKernelV2 {
2127
2171
  private container;
2128
2172
  constructor(options: any);
2129
2173
  updateVersionDisplay(): void;
2174
+ /**
2175
+ * 通过 viewToken 解析 3D 模型地址,再复用现有 loaderModule URL 加载逻辑。
2176
+ */
2177
+ loadModelByViewToken(viewToken: string, options?: any): Promise<void>;
2130
2178
  /**
2131
2179
  * 对指定 url 的 3D 模型应用整体校准矩阵。
2132
2180
  */
@@ -6164,6 +6212,31 @@ declare class SceneModuleGaussian {
6164
6212
  dispose(): void;
6165
6213
  }
6166
6214
 
6215
+ export declare interface SdkAuthOptions {
6216
+ endpoint: string;
6217
+ token?: string;
6218
+ appId?: string;
6219
+ appKey?: string;
6220
+ appSecret?: string;
6221
+ origin?: string;
6222
+ product?: string;
6223
+ timeoutMs?: number;
6224
+ }
6225
+
6226
+ export declare type SdkEngineType = '3d' | '2d' | '720' | 'gis' | 'gaussian';
6227
+
6228
+ export declare interface SdkVerifySession {
6229
+ authorized: boolean;
6230
+ expiresIn: number;
6231
+ sdkToken?: string;
6232
+ appId: string;
6233
+ applicationId: number;
6234
+ teamId: number;
6235
+ engineType: string;
6236
+ origin?: string;
6237
+ enginePermissions: string[];
6238
+ }
6239
+
6167
6240
  /** 可被右键搜索面板检索的文字实体索引。 */
6168
6241
  declare interface SearchableText2d {
6169
6242
  id: string;
@@ -6623,7 +6696,7 @@ declare class ViewerModuleGIS {
6623
6696
  private normalizeImageryMaximumLevel;
6624
6697
  /**
6625
6698
  * 配置 Cesium 静态资源目录。
6626
- * Vite 开发环境未配置时会把 Assets/*.json 回退成 index.html,导致 JSON 解析失败。
6699
+ * 默认从 SDK 打包产物同级的 Cesium/ 目录解析,避免依赖业务项目的 /node_modules 路径。
6627
6700
  */
6628
6701
  private configureCesiumBaseUrl;
6629
6702
  /**