iflow-engine-base 4.0.11 → 4.0.13

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
@@ -2073,8 +2073,6 @@ declare class ComposerModule_2 {
2073
2073
  get composer(): RenderPipeline | null;
2074
2074
  /** 返回持久化的 WebGPU RenderPipeline。 */
2075
2075
  get renderPipeline(): RenderPipeline | null;
2076
- /** 后期效果之外的背景场景,供天空等无限远背景使用。 */
2077
- get postProcessingBackgroundScene(): Scene;
2078
2076
  /** 后期效果之外的叠加场景,供剖切面和交互辅助对象使用。 */
2079
2077
  get postProcessingOverlayScene(): Scene;
2080
2078
  /** 返回当前 SSGI 节点。 */
@@ -4030,10 +4028,10 @@ export declare interface EngineKernelV3Options {
4030
4028
  meshDistanceCullingEnabled?: boolean;
4031
4029
  /** 是否对 InstancedMesh 开启距离裁剪,默认开启。 */
4032
4030
  instanceDistanceCullingEnabled?: boolean;
4031
+ /** 相机交互期间实例距离裁剪的更新间隔(毫秒);设为 0 可恢复逐帧计算,默认 100。 */
4032
+ instanceDistanceCullingUpdateIntervalMs?: number;
4033
4033
  maxTrianglesPerMesh?: number;
4034
4034
  minProjectedSizePx?: number;
4035
- /** Instance 空间批次最大中心半径与实例直径之比;值越小局部恢复越准确,批次数也越多。 */
4036
- maxInstanceBatchRadiusSizeRatio?: number;
4037
4035
  };
4038
4036
  /** 默认开启批次深度偏移以缓解共面闪烁;确认模型不存在 z-fighting 时可显式关闭。 */
4039
4037
  modelDepthBias?: boolean;
@@ -5661,15 +5659,19 @@ declare class Ground_2 {
5661
5659
  private groundMesh;
5662
5660
  /** 当前为官方 Water 水面时为 true,用于 update/dispose 分支 */
5663
5661
  private isWaterAddon;
5662
+ /** 未显式配置太阳方向时,使水面高光跟随场景主定向光。 */
5663
+ private syncWaterSunDirection;
5664
5664
  private groundY;
5665
- /** 默认水面法线贴图路径(项目内为 public/textture/waternormals.jpg) */
5665
+ private readonly lightWorldPosition;
5666
+ private readonly lightTargetWorldPosition;
5667
+ /** 官网案例使用的水面法线贴图。 */
5666
5668
  private static readonly DEFAULT_WATER_NORMALS;
5667
5669
  private groundList;
5668
5670
  constructor(engine: any);
5669
5671
  init(): void;
5670
5672
  /**
5671
5673
  * 切换地面类型
5672
- * @param id 地面 id:"0" 无 | "1" 草地 | "2" 混凝土 | "3" 地砖 | "4" 湖面 | "5" 海面
5674
+ * @param id 地面预设 ID,其中“13”为湖面,“14”为海面。
5673
5675
  */
5674
5676
  setGround(id: GroundId_2, config?: GroundConfig_2): void;
5675
5677
  /**
@@ -5679,7 +5681,7 @@ declare class Ground_2 {
5679
5681
  setHeight(y: number): void;
5680
5682
  /** 获取当前地面高度 */
5681
5683
  getHeight(): number;
5682
- /** 每帧调用,驱动水面动画并与场景阳光/相机同步 */
5684
+ /** 每帧同步场景主光;水面动画和相机位置由 TSL 节点自动更新。 */
5683
5685
  update(): void;
5684
5686
  /** 获取地面列表(id + 名称) */
5685
5687
  getGroundList(): Array<{
@@ -5692,13 +5694,11 @@ declare class Ground_2 {
5692
5694
  show(): void;
5693
5695
  hide(): void;
5694
5696
  dispose(): void;
5695
- /**
5696
- * 兼容项目内本地 three 渲染器。
5697
- * 本地渲染器会向 lights uniforms 写入 directional/spot/point 的 shadowMap,
5698
- * 但 npm Water 使用的 three 版本没有把这些 sampler 挂到 UniformsLib['lights'] 上。
5699
- */
5700
- private ensureWaterShadowUniforms;
5701
5697
  private _dispose;
5698
+ /** 计算从定向光目标指向光源的单位向量,作为水面的太阳方向。 */
5699
+ private getSceneSunDirection;
5700
+ /** 水面可见时关闭空闲限帧,保证 TSL 时间节点持续产生平滑波纹。 */
5701
+ private updateWaterFrameRateExemption;
5702
5702
  }
5703
5703
 
5704
5704
  declare interface GroundConfig {
@@ -5719,25 +5719,39 @@ declare interface GroundConfig {
5719
5719
  }
5720
5720
 
5721
5721
  declare interface GroundConfig_2 {
5722
- /** 地面尺寸(默认 300) */
5722
+ /** 地面尺寸;水面默认 10000,其他地面默认 30000 */
5723
5723
  size?: number;
5724
5724
  /** 贴图 URL(仅实体地面有效) */
5725
5725
  textureUrl?: string;
5726
5726
  /** 阳光方向(默认斜上方) */
5727
5727
  sunDirection?: THREE.Vector3;
5728
- /** 水面透明度(默认 0.82) */
5728
+ /** 水面透明度,范围 0 至 1(默认 0.92) */
5729
5729
  opacity?: number;
5730
5730
  /** 水面法线贴图 URL(默认使用 public 下的 waternormals.jpg) */
5731
5731
  waterNormalsUrl?: string;
5732
+ /** @deprecated 官网 WaterMesh 方案只使用一张法线贴图。 */
5733
+ waterNormalsUrl2?: string;
5734
+ /** 水体颜色,默认与官网案例一致为 0x001e0f */
5735
+ waterColor?: THREE.ColorRepresentation;
5736
+ /** 太阳光颜色,默认与官网案例一致为白色 */
5737
+ sunColor?: THREE.ColorRepresentation;
5732
5738
  /** 水面反射扭曲强度,覆盖预设 */
5733
5739
  distortionScale?: number;
5734
5740
  /** 水面波纹密度(size uniform),覆盖预设 */
5735
5741
  waterSize?: number;
5742
+ /** 反射通道的分辨率倍率,默认与官网 WaterMesh 一致为 0.5 */
5743
+ resolutionScale?: number;
5744
+ /** @deprecated 官网 WaterMesh 方案不使用定向水流。 */
5745
+ flowDirection?: THREE.Vector2;
5746
+ /** @deprecated 官网 WaterMesh 方案由内置 time 节点驱动波纹。 */
5747
+ flowSpeed?: number;
5748
+ /** @deprecated 官网 WaterMesh 使用固定的菲涅尔基础反射率。 */
5749
+ reflectivity?: number;
5736
5750
  }
5737
5751
 
5738
- declare type GroundId = "0" | "1" | "2" | "3" | "4" | "5";
5752
+ declare type GroundId = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14";
5739
5753
 
5740
- declare type GroundId_2 = "0" | "1" | "2" | "3" | "4" | "5";
5754
+ declare type GroundId_2 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14";
5741
5755
 
5742
5756
  /** GTAO 参数。 */
5743
5757
  export declare interface GTAOPostProcessingSettings {
@@ -5814,7 +5828,6 @@ declare class Hdr_2 {
5814
5828
  private currentBackgroundIntensity;
5815
5829
  private currentTexture;
5816
5830
  private currentEnvironmentTexture;
5817
- private skybox;
5818
5831
  private readonly textureCache;
5819
5832
  private previousBackground;
5820
5833
  private previousEnvironment;
@@ -5840,9 +5853,6 @@ declare class Hdr_2 {
5840
5853
  private _loadHdr;
5841
5854
  private _applyTexture;
5842
5855
  private _captureSceneState;
5843
- private _createSkybox;
5844
- private _updateSkyboxIntensity;
5845
- private _removeSkybox;
5846
5856
  private _clearHdr;
5847
5857
  private _getAmbientLightIntensity;
5848
5858
  private _setAmbientLightIntensity;
@@ -7592,6 +7602,8 @@ declare class LoaderModule_2 {
7592
7602
  private engine;
7593
7603
  private unloadedModelUrls;
7594
7604
  private modelLoadVersions;
7605
+ private hasTriggeredInitialHome;
7606
+ private homeBoundingBox;
7595
7607
  constructor(engine: any);
7596
7608
  /**
7597
7609
  * 批量加载模型 URL。
@@ -7617,10 +7629,18 @@ declare class LoaderModule_2 {
7617
7629
  isModelUnloadRequested(url: string): boolean;
7618
7630
  /** 校验异步任务是否仍属于当前 URL 的最新一次加载。 */
7619
7631
  isModelLoadActive(url: string, loadVersion: number): boolean;
7632
+ /** info 已读取并登记模型包围盒后立即判断是否需要回正相机。 */
7633
+ onModelInfoReady(): void;
7620
7634
  /** 清理模型运行状态数组,避免交互继续引用已卸载构件。 */
7621
7635
  private clearEngineStatus;
7622
7636
  /** 删除模型组缓存;对象索引种子保持单调递增,避免复用旧索引。 */
7623
7637
  private removeModelGroupReference;
7638
+ /** 判断当前所有模型的最外层包围盒是否需要触发一次 Home。 */
7639
+ private shouldTriggerHomeForCurrentModels;
7640
+ /** 卸载后重新计算缓存,避免已删除的大模型范围继续阻止后续 Home。 */
7641
+ private refreshHomeBoundingBoxAfterUnload;
7642
+ /** 将 OctreeBox 返回的全场景范围转换为独立 Box3,避免引用后续被修改。 */
7643
+ private getCurrentModelBoundingBox;
7624
7644
  /**
7625
7645
  * 把浏览器 File 列表整理成现有加载器可识别的本地虚拟模型入口。
7626
7646
  */
@@ -13193,9 +13213,13 @@ declare class SkyManager_2 {
13193
13213
  /** 设置天空生成的 IBL 环境光强度。 */
13194
13214
  setIntensity(intensity: number): void;
13195
13215
  getIntensity(): number;
13196
- /** 在渲染前让天空跟随相机,避免大世界坐标精度损失。 */
13216
+ /** 在渲染前让天空球跟随相机,避免大世界坐标精度损失。 */
13197
13217
  update(_time?: number): void;
13198
- private _getBackgroundScene;
13218
+ /**
13219
+ * SkyMesh 默认立方体会让 positionWorld 在面边界产生可见插值差异。
13220
+ * 保留其 WebGPU/TSL 材质,只将几何数据替换为连续球面。
13221
+ */
13222
+ private _createSeamlessSky;
13199
13223
  private _syncSkyToCamera;
13200
13224
  private _isOrthographicCamera;
13201
13225
  private _getEffectiveExposure;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iflow-engine-base",
3
- "version": "4.0.11",
3
+ "version": "4.0.13",
4
4
  "description": "BIM Engine SDK for Vue2, Vue3, React and HTML",
5
5
  "main": "./dist/bim-engine-sdk.umd.js",
6
6
  "module": "./dist/bim-engine-sdk.es.js",