iflow-engine-base 4.0.0 → 4.0.10
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/bim-engine-sdk.es.js +3 -3
- package/dist/bim-engine-sdk.umd.js +875 -875
- package/dist/chunks/{EngineKernel-BN8tMHPw.js → EngineKernel-Kg-SdrzV.js} +3477 -4763
- package/dist/chunks/{engine-2d-DNl3JeLt.js → engine-2d-BsdGqViB.js} +4 -4
- package/dist/chunks/{engine-3d-CEP_oxL3.js → engine-3d-DouCKYY-.js} +10215 -10179
- package/dist/chunks/{engine-720-50HCftiR.js → engine-720-DvQtPJ60.js} +8 -8
- package/dist/chunks/{engine-gaussian-FZvEweZh.js → engine-gaussian-BqR-uPbs.js} +2 -2
- package/dist/chunks/{engine-gis-ClS_rnhI.js → engine-gis-CgZIsySE.js} +3 -3
- package/dist/chunks/{index-B0U7tpVx.js → index-DwsjDyNp.js} +140 -131
- package/dist/chunks/{sdk-assets-CMjpGLbQ.js → sdk-assets-Cf6dJkM2.js} +2 -2
- package/dist/chunks/{sdk-runtime-fnXycr6Y.js → sdk-runtime-DJ9E8kq3.js} +17 -17
- package/dist/chunks/{sdk-vendor-DKP0f5lz.js → sdk-vendor-CPnf2j9F.js} +1 -1
- package/dist/chunks/{three-vendor-XSz124jq.js → three-vendor-DolVXUca.js} +12214 -12156
- package/dist/index.d.ts +301 -182
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { Path } from 'fabric';
|
|
|
12
12
|
import { Rect } from 'fabric';
|
|
13
13
|
import { RenderPipeline } from 'three/webgpu';
|
|
14
14
|
import { Resource } from 'cesium';
|
|
15
|
+
import { Scene } from 'three';
|
|
15
16
|
import * as THREE from 'three';
|
|
16
17
|
import { Viewer } from 'cesium';
|
|
17
18
|
import { WebGPURenderer } from 'three/webgpu';
|
|
@@ -1824,60 +1825,42 @@ declare class Clipping {
|
|
|
1824
1825
|
private setPlaneConstantsHigh;
|
|
1825
1826
|
}
|
|
1826
1827
|
|
|
1828
|
+
/** Public V3 clipping facade. Runtime clipping is applied through WebGPU clipping groups. */
|
|
1827
1829
|
declare class Clipping_2 {
|
|
1828
|
-
private engine;
|
|
1829
|
-
private readonly
|
|
1830
|
-
|
|
1831
|
-
|
|
1830
|
+
private readonly engine;
|
|
1831
|
+
private readonly state;
|
|
1832
|
+
private viewRangePlanes;
|
|
1833
|
+
readonly sectionPlane: THREE.Plane[];
|
|
1834
|
+
readonly sectionBox: WebGPUSectionBox;
|
|
1835
|
+
readonly sectionFace: WebGPUSectionFace;
|
|
1832
1836
|
clippingStencil: any;
|
|
1833
|
-
clippingCSGSimple:
|
|
1837
|
+
clippingCSGSimple: ReturnType<typeof createWebGPUFillAdapter>;
|
|
1834
1838
|
currentClippingMode: string;
|
|
1835
1839
|
sectionCatchFace: any;
|
|
1836
1840
|
fillCutFace: boolean;
|
|
1837
|
-
private viewRangePlanes;
|
|
1838
1841
|
constructor(engine: any);
|
|
1839
1842
|
init(): void;
|
|
1840
1843
|
scaleBox(): void;
|
|
1841
|
-
setFillCutFace(
|
|
1844
|
+
setFillCutFace(enabled: boolean): void;
|
|
1842
1845
|
getFillCutFace(): boolean;
|
|
1843
|
-
clippingModel(models: any): void;
|
|
1846
|
+
clippingModel(models: any[]): void;
|
|
1844
1847
|
updateClippingValue(value: any): void;
|
|
1845
1848
|
active(type: string): void;
|
|
1846
1849
|
disabled(): void;
|
|
1847
1850
|
recover(): void;
|
|
1848
1851
|
reverse(): void;
|
|
1849
1852
|
disActive(): void;
|
|
1853
|
+
/** 释放剖切覆盖层和指针监听。 */
|
|
1854
|
+
dispose(): void;
|
|
1850
1855
|
isPointInClippingRange(point: any, tolerance?: number): boolean;
|
|
1851
1856
|
filterIntersectionsByClipping<T extends {
|
|
1852
1857
|
point?: any;
|
|
1853
|
-
}>(
|
|
1854
|
-
/**
|
|
1855
|
-
* 判断包围盒是否仍与当前可见剖切区域相交。
|
|
1856
|
-
* 只要包围盒被任一剖切平面完全裁掉,就可以在八叉树阶段提前跳过。
|
|
1857
|
-
*/
|
|
1858
|
+
}>(items: T[] | null | undefined, tolerance?: number): T[];
|
|
1858
1859
|
doesBoxIntersectClippingRange(box: THREE.Box3 | {
|
|
1859
1860
|
min: any;
|
|
1860
1861
|
max: any;
|
|
1861
1862
|
} | null | undefined, tolerance?: number): boolean;
|
|
1862
1863
|
getClippedBoundingBox(baseBox?: THREE.Box3): THREE.Box3 | null;
|
|
1863
|
-
private getEffectiveClippingPlanes;
|
|
1864
|
-
private toBox3;
|
|
1865
|
-
private getBoxBoundaryPlanes;
|
|
1866
|
-
private intersectThreePlanes;
|
|
1867
|
-
private isPointInsidePlanes;
|
|
1868
|
-
/**
|
|
1869
|
-
* 取包围盒在平面法线方向上的最远顶点;
|
|
1870
|
-
* 如果这个点仍落在平面外侧,说明整个包围盒都已经被该平面剔除。
|
|
1871
|
-
*/
|
|
1872
|
-
private isBoxVisibleAgainstPlane;
|
|
1873
|
-
private pushUniquePoint;
|
|
1874
|
-
private isVector3Like;
|
|
1875
|
-
/**
|
|
1876
|
-
* 按视图原点与视线方向设置剖面(用于打开剖面视图)
|
|
1877
|
-
* 剖切面过 origin,法向指向相机侧,并生成与场景包围盒同大的剖切面
|
|
1878
|
-
* @param origin 剖面上的点 {x, y, z}(与视图 Origin 一致)
|
|
1879
|
-
* @param viewDirection 视线方向 {x, y, z}(与视图 ViewDirection 一致)
|
|
1880
|
-
*/
|
|
1881
1864
|
setSectionByView(origin: {
|
|
1882
1865
|
x: number;
|
|
1883
1866
|
y: number;
|
|
@@ -1887,14 +1870,10 @@ declare class Clipping_2 {
|
|
|
1887
1870
|
y: number;
|
|
1888
1871
|
z: number;
|
|
1889
1872
|
}): void;
|
|
1890
|
-
/**
|
|
1891
|
-
* 按 Revit 视图范围生成的 6 个平面启用剖切范围。
|
|
1892
|
-
* 平面方向约定为 THREE.Plane 的可见半空间:distanceToPoint(point) >= 0。
|
|
1893
|
-
*/
|
|
1894
1873
|
setSectionPlanesByViewRange(planes: THREE.Plane[]): void;
|
|
1895
|
-
private
|
|
1896
|
-
private
|
|
1897
|
-
private
|
|
1874
|
+
private toBox3;
|
|
1875
|
+
private getBoxBoundaryPlanes;
|
|
1876
|
+
private intersectThreePlanes;
|
|
1898
1877
|
}
|
|
1899
1878
|
|
|
1900
1879
|
/**
|
|
@@ -2032,140 +2011,7 @@ declare class ClippingCSGOptimizedSimple {
|
|
|
2032
2011
|
private getPlaneBasis;
|
|
2033
2012
|
}
|
|
2034
2013
|
|
|
2035
|
-
|
|
2036
|
-
* ClippingCSGOptimizedSimple
|
|
2037
|
-
*
|
|
2038
|
-
* 作用:
|
|
2039
|
-
* 1. 根据剖切平面,计算模型与“薄片平面体”的 CSG 相交结果。
|
|
2040
|
-
* 2. 从相交结果中提取贴近平面的帽面三角形(cap)。
|
|
2041
|
-
* 3. 合并 cap 几何并加入场景,作为剖切补面。
|
|
2042
|
-
*
|
|
2043
|
-
* 设计要点:
|
|
2044
|
-
* - 先粗筛(octree box / mesh box),再做重计算(CSG),避免全量布尔运算。
|
|
2045
|
-
* - 对补面做极小偏移,避免补面材质本身也挂 clippingPlanes 时被同平面裁掉。
|
|
2046
|
-
* - 每次更新前先 clear,保证场景中只存在当前补面。
|
|
2047
|
-
*/
|
|
2048
|
-
declare class ClippingCSGOptimizedSimple_2 {
|
|
2049
|
-
/** 引擎实例(包含 scene / models / engineStatus / octreeBox 等) */
|
|
2050
|
-
private engine;
|
|
2051
|
-
/** three-bvh-csg 计算器,负责执行布尔操作 */
|
|
2052
|
-
private readonly evaluator;
|
|
2053
|
-
/** 场景中补面 Mesh 的统一名前缀 */
|
|
2054
|
-
private readonly fillMeshName;
|
|
2055
|
-
/**
|
|
2056
|
-
* 当前生成的补面集合。
|
|
2057
|
-
* key:平面唯一键(face 或 plane-i-name)
|
|
2058
|
-
* value:对应补面 Mesh
|
|
2059
|
-
*/
|
|
2060
|
-
private readonly fillMeshes;
|
|
2061
|
-
/** 单次最多参与 CSG 的候选 Mesh 数量(保护性能) */
|
|
2062
|
-
private readonly maxCandidates;
|
|
2063
|
-
/** 单个 mesh 最大三角面阈值(过大直接跳过,保护实时交互) */
|
|
2064
|
-
private readonly maxTriangleCountPerMesh;
|
|
2065
|
-
/** 补面统一材质(由你在构造器中挂了 clippingPlanes) */
|
|
2066
|
-
private fillMaterial;
|
|
2067
|
-
private readonly fillTextureRepeat;
|
|
2068
|
-
private readonly fillTextureRotation;
|
|
2069
|
-
constructor(engine: any);
|
|
2070
|
-
/**
|
|
2071
|
-
* 清理当前所有补面。
|
|
2072
|
-
* - 从 scene 移除 mesh
|
|
2073
|
-
* - 释放 geometry / material 资源
|
|
2074
|
-
*/
|
|
2075
|
-
clear(): void;
|
|
2076
|
-
/**
|
|
2077
|
-
* 单平面补面入口(face/x/y/z 模式可用)。
|
|
2078
|
-
* 每次调用先 clear,再构建当前平面的补面。
|
|
2079
|
-
*/
|
|
2080
|
-
updataFace(plane: any): void;
|
|
2081
|
-
/**
|
|
2082
|
-
* 多平面补面入口(box 模式可用)。
|
|
2083
|
-
* 约定:传入的每个合法平面都分别生成一份补面。
|
|
2084
|
-
*/
|
|
2085
|
-
updataFaces(planes: any[]): void;
|
|
2086
|
-
/**
|
|
2087
|
-
* 构建某一个平面的补面。
|
|
2088
|
-
*
|
|
2089
|
-
* 主流程:
|
|
2090
|
-
* 1) 拿场景包围盒,确定平面体尺寸。
|
|
2091
|
-
* 2) 基于 octree 与 plane 相交,筛候选 mesh。
|
|
2092
|
-
* 3) 再按 mesh world box 与复杂度做二次筛选。
|
|
2093
|
-
* 4) 对每个候选 mesh 执行 CSG INTERSECTION。
|
|
2094
|
-
* 5) 从交集几何中提取贴近平面的 cap 三角形。
|
|
2095
|
-
* 6) 合并 cap,做轻微偏移,创建补面 mesh。
|
|
2096
|
-
*/
|
|
2097
|
-
private buildSinglePlaneFill;
|
|
2098
|
-
/**
|
|
2099
|
-
* 获取补面偏移距离。
|
|
2100
|
-
* - 可通过 engine.engineStatus.clippingFaceOffset 覆盖
|
|
2101
|
-
* - 默认按模型尺度自适应并带最小值
|
|
2102
|
-
*/
|
|
2103
|
-
private getFaceOffsetDistance;
|
|
2104
|
-
/**
|
|
2105
|
-
* 获取补面偏移方向。
|
|
2106
|
-
* - 可通过 engine.engineStatus.clippingFaceOffsetSign 指定(1/-1)
|
|
2107
|
-
* - 默认 -1,即沿 -normal 方向偏移
|
|
2108
|
-
*/
|
|
2109
|
-
private getFaceOffsetSign;
|
|
2110
|
-
/**
|
|
2111
|
-
* 使用 octree + plane 相交快速收集候选 mesh。
|
|
2112
|
-
*
|
|
2113
|
-
* 过程:
|
|
2114
|
-
* - 遍历 engineStatus.models -> lod.octreeBox
|
|
2115
|
-
* - 只取与 plane 相交的 octree 节点元素 id
|
|
2116
|
-
* - 跳过隐藏/半透明/实例化节点
|
|
2117
|
-
* - 收集节点 infos 里的 mesh,并按 uuid 去重
|
|
2118
|
-
*/
|
|
2119
|
-
private collectCandidateMeshesFromOctree;
|
|
2120
|
-
/**
|
|
2121
|
-
* 收集当前 model url 下需要忽略的元素 id(隐藏 + 半透明)。
|
|
2122
|
-
*/
|
|
2123
|
-
private getIgnoredIds;
|
|
2124
|
-
/**
|
|
2125
|
-
* 深度遍历 octree,返回与 plane 相交节点中的 element id 集合。
|
|
2126
|
-
*/
|
|
2127
|
-
private collectIntersectElementIds;
|
|
2128
|
-
/**
|
|
2129
|
-
* 将引擎 octree 节点坐标转换为 three.js 的 Box3(含单位/坐标系转换)。
|
|
2130
|
-
*/
|
|
2131
|
-
private octreeNodeToBox3;
|
|
2132
|
-
/**
|
|
2133
|
-
* 候选 mesh 二次筛选:
|
|
2134
|
-
* - 必须存在有效 position
|
|
2135
|
-
* - 三角面数不能超过阈值
|
|
2136
|
-
* - world bbox 必须与 plane 相交
|
|
2137
|
-
*/
|
|
2138
|
-
private filterMeshesByBoxAndComplexity;
|
|
2139
|
-
/**
|
|
2140
|
-
* 构造“薄片平面体” Brush:
|
|
2141
|
-
* - 几何为 BoxGeometry(size, size, thickness)
|
|
2142
|
-
* - 旋转到 plane.normal
|
|
2143
|
-
* - 平移到 plane 上
|
|
2144
|
-
*/
|
|
2145
|
-
private createPlaneBrush;
|
|
2146
|
-
/**
|
|
2147
|
-
* 将场景 mesh 转为世界坐标 Brush。
|
|
2148
|
-
*/
|
|
2149
|
-
private createWorldBrushFromMesh;
|
|
2150
|
-
/**
|
|
2151
|
-
* 统一 CSG 输入属性,避免属性不一致报错(例如 uv 缺失)。
|
|
2152
|
-
* 目标属性固定为:position / normal / uv
|
|
2153
|
-
*/
|
|
2154
|
-
private toCsgReadyGeometry;
|
|
2155
|
-
/**
|
|
2156
|
-
* 从 CSG 相交结果中提取补面三角形。
|
|
2157
|
-
*
|
|
2158
|
-
* 判定条件:
|
|
2159
|
-
* - 三角形法线与 plane.normal 足够平行(|dot| >= 0.9)
|
|
2160
|
-
* - 三角形顶点到平面的距离 spread 足够小
|
|
2161
|
-
* - 三角形平均距离落在薄片附近,且位于有效侧
|
|
2162
|
-
*
|
|
2163
|
-
* 提取后将三角形顶点投影回 plane,保证补面共面。
|
|
2164
|
-
*/
|
|
2165
|
-
private extractPlaneCapGeometry;
|
|
2166
|
-
private applyPlanarUv;
|
|
2167
|
-
private getPlaneBasis;
|
|
2168
|
-
}
|
|
2014
|
+
declare type ClippingMode = 'x' | 'y' | 'z' | 'box' | 'face' | 'viewRange' | '';
|
|
2169
2015
|
|
|
2170
2016
|
declare class Collector {
|
|
2171
2017
|
private engine;
|
|
@@ -2227,6 +2073,10 @@ declare class ComposerModule_2 {
|
|
|
2227
2073
|
get composer(): RenderPipeline | null;
|
|
2228
2074
|
/** 返回持久化的 WebGPU RenderPipeline。 */
|
|
2229
2075
|
get renderPipeline(): RenderPipeline | null;
|
|
2076
|
+
/** 后期效果之外的背景场景,供天空等无限远背景使用。 */
|
|
2077
|
+
get postProcessingBackgroundScene(): Scene;
|
|
2078
|
+
/** 后期效果之外的叠加场景,供剖切面和交互辅助对象使用。 */
|
|
2079
|
+
get postProcessingOverlayScene(): Scene;
|
|
2230
2080
|
/** 返回当前 SSGI 节点。 */
|
|
2231
2081
|
get ssgiPass(): any;
|
|
2232
2082
|
/** 返回当前 VXGI 体素锥追踪节点。 */
|
|
@@ -2537,6 +2387,7 @@ declare class ControlModule_2 {
|
|
|
2537
2387
|
private handelBehaved;
|
|
2538
2388
|
private pendingThirdPersonOptions;
|
|
2539
2389
|
private prevContainerCursor;
|
|
2390
|
+
private suspendedControl;
|
|
2540
2391
|
private roamLookDirection;
|
|
2541
2392
|
private isDragging;
|
|
2542
2393
|
private isDown;
|
|
@@ -2567,7 +2418,7 @@ declare class ControlModule_2 {
|
|
|
2567
2418
|
private createThirdPersonControl;
|
|
2568
2419
|
private beginThirdPersonPlacement;
|
|
2569
2420
|
isWaitingThirdPersonPlacement(): boolean;
|
|
2570
|
-
applyThirdPersonPlacement(point: THREE.Vector3): boolean;
|
|
2421
|
+
applyThirdPersonPlacement(point: THREE.Vector3, normal?: THREE.Vector3): boolean;
|
|
2571
2422
|
setThirdPersonAvatar(model: any, options?: any): void;
|
|
2572
2423
|
setThirdPersonMoveSpeed(value: number): void;
|
|
2573
2424
|
setThirdPersonApplyCollision(value: boolean): void;
|
|
@@ -2648,6 +2499,13 @@ export declare function createEngineGaussian(options: any): Promise<EngineKernel
|
|
|
2648
2499
|
*/
|
|
2649
2500
|
export declare function createEngineGIS(options: any): Promise<EngineKernelGIS>;
|
|
2650
2501
|
|
|
2502
|
+
/** V2 补面接口的兼容适配器;WebGPU 路径不再执行逐帧 CSG。 */
|
|
2503
|
+
declare function createWebGPUFillAdapter(): {
|
|
2504
|
+
clear(): void;
|
|
2505
|
+
updataFace(_plane: THREE.Plane): void;
|
|
2506
|
+
updataFaces(_planes: THREE.Plane[]): void;
|
|
2507
|
+
};
|
|
2508
|
+
|
|
2651
2509
|
export declare const DEFAULT_AUTO_EXPOSURE_OPTIONS: ResolvedAutoExposureOptions;
|
|
2652
2510
|
|
|
2653
2511
|
export declare const DEFAULT_LIGHTING_PRESETS: readonly LightingPreset[];
|
|
@@ -4423,7 +4281,10 @@ declare interface EngineSettings_2 {
|
|
|
4423
4281
|
environment: {
|
|
4424
4282
|
type: EnvironmentType_2;
|
|
4425
4283
|
hdrId: string;
|
|
4284
|
+
/** 兼容字段:历史版本表示环境亮度。 */
|
|
4426
4285
|
hdrIntensity: number;
|
|
4286
|
+
hdrBackgroundIntensity: number;
|
|
4287
|
+
hdrEnvironmentIntensity: number;
|
|
4427
4288
|
skyPreset: SkyPresetName_2;
|
|
4428
4289
|
skyParams: SkyParams_2;
|
|
4429
4290
|
skyIntensity: number;
|
|
@@ -5950,6 +5811,7 @@ declare class Hdr_2 {
|
|
|
5950
5811
|
private currentHdrId;
|
|
5951
5812
|
private isVisible;
|
|
5952
5813
|
private currentIntensity;
|
|
5814
|
+
private currentBackgroundIntensity;
|
|
5953
5815
|
private currentTexture;
|
|
5954
5816
|
private currentEnvironmentTexture;
|
|
5955
5817
|
private skybox;
|
|
@@ -5969,7 +5831,10 @@ declare class Hdr_2 {
|
|
|
5969
5831
|
getCurrentHdrId(): string;
|
|
5970
5832
|
getVisible(): boolean;
|
|
5971
5833
|
setIntensity(intensity: number): void;
|
|
5834
|
+
/** 设置 HDR 背景亮度,不改变场景材质使用的环境光强度。 */
|
|
5835
|
+
setBackgroundIntensity(intensity: number): void;
|
|
5972
5836
|
getIntensity(): number;
|
|
5837
|
+
getBackgroundIntensity(): number;
|
|
5973
5838
|
addHdrItem(item: HdrItem_2): void;
|
|
5974
5839
|
dispose(): void;
|
|
5975
5840
|
private _loadHdr;
|
|
@@ -8738,8 +8603,9 @@ declare class MiniMap_2 {
|
|
|
8738
8603
|
}
|
|
8739
8604
|
|
|
8740
8605
|
declare interface MobileMemoryProfile {
|
|
8741
|
-
readonly maxTextureSize: 2048 |
|
|
8742
|
-
readonly samples:
|
|
8606
|
+
readonly maxTextureSize: 2 | 2048 | 4096 | 10240;
|
|
8607
|
+
readonly samples: 0 | 2 | 4 | 6;
|
|
8608
|
+
readonly restrictTextureSize: boolean;
|
|
8743
8609
|
}
|
|
8744
8610
|
|
|
8745
8611
|
export declare interface ModelAnimationInfo {
|
|
@@ -12272,8 +12138,6 @@ declare class RenderModule_2 {
|
|
|
12272
12138
|
/** WebGPU 设备初始化是异步的,初始化顺序之外保持与 v2 一致。 */
|
|
12273
12139
|
initRenderer(): Promise<WebGPURenderer>;
|
|
12274
12140
|
disposeRenderer(): void;
|
|
12275
|
-
/** 未显式配置背景时,使用内置 HDR 作为 v3 默认背景。 */
|
|
12276
|
-
private initializeDefaultBackground;
|
|
12277
12141
|
/**
|
|
12278
12142
|
* 在最终渲染结果上追加 canvas 内嵌水印。
|
|
12279
12143
|
*/
|
|
@@ -12810,6 +12674,205 @@ export declare type SearchTheme3d = 'light' | 'dark';
|
|
|
12810
12674
|
|
|
12811
12675
|
declare type SearchTheme3d_2 = 'light' | 'dark';
|
|
12812
12676
|
|
|
12677
|
+
declare class SectionBox {
|
|
12678
|
+
private engine;
|
|
12679
|
+
private isActive;
|
|
12680
|
+
private isCtrlDown;
|
|
12681
|
+
private listenersAttached;
|
|
12682
|
+
private box;
|
|
12683
|
+
private pickPoint;
|
|
12684
|
+
private pickNormal;
|
|
12685
|
+
private pickMesh;
|
|
12686
|
+
private box_;
|
|
12687
|
+
private plane;
|
|
12688
|
+
private meshs;
|
|
12689
|
+
private isDrag;
|
|
12690
|
+
maxBox: any;
|
|
12691
|
+
private readonly faceIdleOpacity;
|
|
12692
|
+
private readonly faceHoverOpacity;
|
|
12693
|
+
private readonly mobileLongPressDelay;
|
|
12694
|
+
private readonly mobileLongPressMoveTolerance;
|
|
12695
|
+
private touchLongPressTimer;
|
|
12696
|
+
private touchLongPressActive;
|
|
12697
|
+
private touchStartPosition;
|
|
12698
|
+
private touchLatestEvent;
|
|
12699
|
+
private readonly transformControls;
|
|
12700
|
+
private readonly transformAnchors;
|
|
12701
|
+
private readonly transformHelpers;
|
|
12702
|
+
private readonly faceMetaMap;
|
|
12703
|
+
private isSyncingTransform;
|
|
12704
|
+
private readonly transformHandleSize;
|
|
12705
|
+
private readonly transformHandleColor;
|
|
12706
|
+
private readonly transformHandleHoverColor;
|
|
12707
|
+
private readonly handleNativeMouseDown;
|
|
12708
|
+
private readonly handleNativeMouseMove;
|
|
12709
|
+
private readonly handleNativeMouseUp;
|
|
12710
|
+
private readonly handleNativeTouchStart;
|
|
12711
|
+
private readonly handleNativeTouchMove;
|
|
12712
|
+
private readonly handleNativeTouchEnd;
|
|
12713
|
+
private readonly handleNativeKeyDown;
|
|
12714
|
+
private readonly handleNativeKeyUp;
|
|
12715
|
+
constructor(engine: any, options?: {
|
|
12716
|
+
useCsgClipping?: boolean;
|
|
12717
|
+
});
|
|
12718
|
+
active(): void;
|
|
12719
|
+
disActive(): void;
|
|
12720
|
+
disabled(): void;
|
|
12721
|
+
recover(): void;
|
|
12722
|
+
init(updateFill?: boolean): void;
|
|
12723
|
+
getboxXyz(): {
|
|
12724
|
+
minX: any;
|
|
12725
|
+
minY: any;
|
|
12726
|
+
minZ: any;
|
|
12727
|
+
maxX: any;
|
|
12728
|
+
maxY: any;
|
|
12729
|
+
maxZ: any;
|
|
12730
|
+
};
|
|
12731
|
+
setboxXyz(xyz: any): void;
|
|
12732
|
+
setBox(box: any): void;
|
|
12733
|
+
reverseBox(): void;
|
|
12734
|
+
handleMouseDown(event: any): void;
|
|
12735
|
+
handleMouseUp(_event: any, updateFill?: boolean): void;
|
|
12736
|
+
private clampVector3;
|
|
12737
|
+
handleMouseMove(event: any): void;
|
|
12738
|
+
calculate_ratio(): void;
|
|
12739
|
+
private toPercent;
|
|
12740
|
+
private getInteractiveMeshes;
|
|
12741
|
+
private createRaycasterFromMouseEvent;
|
|
12742
|
+
private isMobileDevice;
|
|
12743
|
+
private getTouchPoint;
|
|
12744
|
+
private createMouseEventFromTouch;
|
|
12745
|
+
private clearTouchLongPressTimer;
|
|
12746
|
+
private resetTouchLongPressState;
|
|
12747
|
+
private attachListeners;
|
|
12748
|
+
private detachListeners;
|
|
12749
|
+
private resetMeshOpacity;
|
|
12750
|
+
private updateClippingBoxFill;
|
|
12751
|
+
private clearClippingBoxFill;
|
|
12752
|
+
private getFaceTransformOffset;
|
|
12753
|
+
private keepSingleDirectionArrow;
|
|
12754
|
+
private setTransformControlsVisible;
|
|
12755
|
+
private ensureFaceTransformControl;
|
|
12756
|
+
private updateFaceTransformControl;
|
|
12757
|
+
private getDominantAxis;
|
|
12758
|
+
private handleTransformObjectChange;
|
|
12759
|
+
updata_face(box: any): void;
|
|
12760
|
+
private createFace;
|
|
12761
|
+
}
|
|
12762
|
+
|
|
12763
|
+
declare class SectionFace {
|
|
12764
|
+
private engine;
|
|
12765
|
+
private isActive;
|
|
12766
|
+
private isDrag;
|
|
12767
|
+
private isCtrlDown;
|
|
12768
|
+
private listenersAttached;
|
|
12769
|
+
private meshs;
|
|
12770
|
+
private box;
|
|
12771
|
+
private pickPoint;
|
|
12772
|
+
private pickNormal;
|
|
12773
|
+
private plane;
|
|
12774
|
+
private angleX;
|
|
12775
|
+
private angleY;
|
|
12776
|
+
private angleZ;
|
|
12777
|
+
private direction;
|
|
12778
|
+
private normal;
|
|
12779
|
+
private distance;
|
|
12780
|
+
private center;
|
|
12781
|
+
private current_center;
|
|
12782
|
+
private dragStartDistance;
|
|
12783
|
+
private dragStartCenter;
|
|
12784
|
+
private readonly idleOpacity;
|
|
12785
|
+
private readonly hoverOpacity;
|
|
12786
|
+
private transformControl;
|
|
12787
|
+
private transformAnchor;
|
|
12788
|
+
private transformHelper;
|
|
12789
|
+
private rotateControl;
|
|
12790
|
+
private rotateAnchor;
|
|
12791
|
+
private rotateHelper;
|
|
12792
|
+
private rotatePivot;
|
|
12793
|
+
private isSyncingTransformControl;
|
|
12794
|
+
private isSyncingRotateControl;
|
|
12795
|
+
private activeControlMode;
|
|
12796
|
+
private readonly moveEpsilon;
|
|
12797
|
+
private readonly transformHandleSize;
|
|
12798
|
+
private readonly rotateHandleSize;
|
|
12799
|
+
private readonly transformHandleColor;
|
|
12800
|
+
private readonly transformHandleHoverColor;
|
|
12801
|
+
private readonly mobileLongPressDelay;
|
|
12802
|
+
private readonly mobileLongPressMoveTolerance;
|
|
12803
|
+
private touchLongPressTimer;
|
|
12804
|
+
private touchLongPressActive;
|
|
12805
|
+
private touchStartPosition;
|
|
12806
|
+
private touchLatestEvent;
|
|
12807
|
+
private readonly handleNativePointerDown;
|
|
12808
|
+
private readonly handleNativePointerUp;
|
|
12809
|
+
private readonly handleNativeMouseDown;
|
|
12810
|
+
private readonly handleNativeMouseMove;
|
|
12811
|
+
private readonly handleNativeMouseUp;
|
|
12812
|
+
private readonly handleNativeTouchStart;
|
|
12813
|
+
private readonly handleNativeTouchMove;
|
|
12814
|
+
private readonly handleNativeTouchEnd;
|
|
12815
|
+
private readonly handleNativeKeyDown;
|
|
12816
|
+
private readonly handleNativeKeyUp;
|
|
12817
|
+
private readonly handleTransformObjectChange;
|
|
12818
|
+
private readonly handleRotateObjectChange;
|
|
12819
|
+
constructor(engine: any);
|
|
12820
|
+
active(): void;
|
|
12821
|
+
disActive(): void;
|
|
12822
|
+
init(skipFaceCreation?: boolean): void;
|
|
12823
|
+
disabled(): void;
|
|
12824
|
+
recover(): void;
|
|
12825
|
+
setFaceAngle(angleX: any, angleY: any, angleZ: any): void;
|
|
12826
|
+
setFaceNormal(normal: any, dis?: any): void;
|
|
12827
|
+
setFaceNormalPlaneOnly(normal: any, dis: any): void;
|
|
12828
|
+
activateClippingOnly(): void;
|
|
12829
|
+
reverse(): void;
|
|
12830
|
+
getFaceAngle(): {
|
|
12831
|
+
angleX: any;
|
|
12832
|
+
angleY: any;
|
|
12833
|
+
angleZ: any;
|
|
12834
|
+
direction: any;
|
|
12835
|
+
};
|
|
12836
|
+
updata_face(dis: any, planeCenter?: THREE.Vector3): void;
|
|
12837
|
+
private createFace;
|
|
12838
|
+
private getDirectionSign;
|
|
12839
|
+
private getEffectiveNormal;
|
|
12840
|
+
private applyClippingToModelMeshes;
|
|
12841
|
+
private applyClippingToMaterial;
|
|
12842
|
+
private requestShadowRefresh;
|
|
12843
|
+
private lockControlMode;
|
|
12844
|
+
private releaseControlModeLock;
|
|
12845
|
+
private applyControlModeLock;
|
|
12846
|
+
private pickControlModeFromPointer;
|
|
12847
|
+
private raycastTransformControlPicker;
|
|
12848
|
+
private getPlaneBasis;
|
|
12849
|
+
private getBoxCorners;
|
|
12850
|
+
private getDistanceRange;
|
|
12851
|
+
private getInteractiveMeshes;
|
|
12852
|
+
private getTransformHandleOffset;
|
|
12853
|
+
private getPlaneQuaternion;
|
|
12854
|
+
private keepSingleDirectionArrow;
|
|
12855
|
+
private ensureTransformControl;
|
|
12856
|
+
private ensureRotateControl;
|
|
12857
|
+
private setTransformControlVisible;
|
|
12858
|
+
private updateTransformControl;
|
|
12859
|
+
private updateRotateControl;
|
|
12860
|
+
private createRaycasterFromMouseEvent;
|
|
12861
|
+
private isMobileDevice;
|
|
12862
|
+
private getTouchPoint;
|
|
12863
|
+
private createMouseEventFromTouch;
|
|
12864
|
+
private clearTouchLongPressTimer;
|
|
12865
|
+
private resetTouchLongPressState;
|
|
12866
|
+
private attachListeners;
|
|
12867
|
+
private detachListeners;
|
|
12868
|
+
private resetMeshOpacity;
|
|
12869
|
+
private updateClippingFaceFill;
|
|
12870
|
+
private clearClippingFaceFill;
|
|
12871
|
+
handleMouseDown(event: any): void;
|
|
12872
|
+
handleMouseUp(_event: any, updateFill?: boolean): void;
|
|
12873
|
+
handleMouseMove(event: any): void;
|
|
12874
|
+
}
|
|
12875
|
+
|
|
12813
12876
|
export declare interface SegmentCalibrationOptions {
|
|
12814
12877
|
url: string;
|
|
12815
12878
|
source: CalibrationSegmentInput;
|
|
@@ -12989,6 +13052,10 @@ declare class Setting_2 {
|
|
|
12989
13052
|
setHdrId(id: string): Promise<void>;
|
|
12990
13053
|
/** 璁剧疆 HDR 寮哄害锛?~100锛夛紝浠呭湪 hdr 妯″紡涓嬬敓鏁?*/
|
|
12991
13054
|
setHdrIntensity(value: number): void;
|
|
13055
|
+
/** 设置 HDR 背景亮度(0~100),不改变模型受环境光影响的亮度。 */
|
|
13056
|
+
setHdrBackgroundIntensity(value: number): void;
|
|
13057
|
+
/** 设置 HDR 环境亮度(0~100),不改变背景显示亮度。 */
|
|
13058
|
+
setHdrEnvironmentIntensity(value: number): void;
|
|
12992
13059
|
/** 璁剧疆澶╃┖棰勮鏂规锛屽綋鍓嶇幆澧冧负 sky 鏃剁珛鍗崇敓鏁?*/
|
|
12993
13060
|
setSkyPreset(preset: SkyPresetName_2): void;
|
|
12994
13061
|
/** 璁剧疆澶╃┖鑷畾涔夊弬鏁帮紝褰撳墠鐜涓?sky 鏃剁珛鍗崇敓鏁?*/
|
|
@@ -13091,15 +13158,16 @@ declare class SkyManager {
|
|
|
13091
13158
|
private _setUniformValue;
|
|
13092
13159
|
}
|
|
13093
13160
|
|
|
13161
|
+
/** 管理 v3 WebGPU 物理天空、动态云层和场景环境光。 */
|
|
13094
13162
|
declare class SkyManager_2 {
|
|
13095
|
-
private engine;
|
|
13163
|
+
private readonly engine;
|
|
13096
13164
|
private sky;
|
|
13097
|
-
private sun;
|
|
13165
|
+
private readonly sun;
|
|
13098
13166
|
private params;
|
|
13099
13167
|
private currentPreset;
|
|
13100
13168
|
private currentIntensity;
|
|
13101
13169
|
private currentEnvironmentTarget;
|
|
13102
|
-
private
|
|
13170
|
+
private environmentRefreshTimer;
|
|
13103
13171
|
private readonly skyName;
|
|
13104
13172
|
private savedCameraFar;
|
|
13105
13173
|
private previousBackground;
|
|
@@ -13110,18 +13178,25 @@ declare class SkyManager_2 {
|
|
|
13110
13178
|
private previousToneMappingExposure;
|
|
13111
13179
|
private hasCapturedSceneState;
|
|
13112
13180
|
constructor(engine: any);
|
|
13181
|
+
/** 启用天空;重复调用只恢复现有资源,不重复创建几何体和材质。 */
|
|
13113
13182
|
activate(): void;
|
|
13183
|
+
/** 关闭天空;remove=false 时保留 GPU 资源,便于频繁切换环境。 */
|
|
13114
13184
|
close(remove?: boolean): void;
|
|
13115
13185
|
isActive(): boolean;
|
|
13116
13186
|
getParams(): Readonly<Required<SkyParams_2>>;
|
|
13187
|
+
/** 合并并约束增量参数,防止非法数值导致 TSL 着色结果出现 NaN。 */
|
|
13117
13188
|
setParams(params: SkyParams_2): void;
|
|
13118
13189
|
setPreset(name: SkyPresetName_2): void;
|
|
13119
13190
|
getCurrentPreset(): SkyPresetName_2;
|
|
13120
13191
|
getPresetNames(): SkyPresetName_2[];
|
|
13121
13192
|
getPresetList(): SkyPresetInfo_2[];
|
|
13193
|
+
/** 设置天空生成的 IBL 环境光强度。 */
|
|
13122
13194
|
setIntensity(intensity: number): void;
|
|
13123
13195
|
getIntensity(): number;
|
|
13124
|
-
|
|
13196
|
+
/** 在渲染前让天空跟随相机,避免大世界坐标精度损失。 */
|
|
13197
|
+
update(_time?: number): void;
|
|
13198
|
+
private _getBackgroundScene;
|
|
13199
|
+
private _syncSkyToCamera;
|
|
13125
13200
|
private _isOrthographicCamera;
|
|
13126
13201
|
private _getEffectiveExposure;
|
|
13127
13202
|
private _expandCameraFarForSky;
|
|
@@ -13129,9 +13204,13 @@ declare class SkyManager_2 {
|
|
|
13129
13204
|
private _applyParamsToSky;
|
|
13130
13205
|
private _captureSceneState;
|
|
13131
13206
|
private _restoreSceneState;
|
|
13207
|
+
private _scheduleEnvironmentRefresh;
|
|
13208
|
+
private _cancelEnvironmentRefresh;
|
|
13132
13209
|
private _refreshEnvironmentMap;
|
|
13133
13210
|
private _disposeEnvironmentTarget;
|
|
13134
|
-
private
|
|
13211
|
+
private _updateAnimationState;
|
|
13212
|
+
private _resolveParams;
|
|
13213
|
+
private _requestRender;
|
|
13135
13214
|
}
|
|
13136
13215
|
|
|
13137
13216
|
declare interface SkyParams {
|
|
@@ -13158,6 +13237,8 @@ declare interface SkyParams_2 {
|
|
|
13158
13237
|
azimuth?: number;
|
|
13159
13238
|
exposure?: number;
|
|
13160
13239
|
orthoExposureScale?: number;
|
|
13240
|
+
cloudScale?: number;
|
|
13241
|
+
cloudSpeed?: number;
|
|
13161
13242
|
cloudCoverage?: number;
|
|
13162
13243
|
cloudDensity?: number;
|
|
13163
13244
|
cloudElevation?: number;
|
|
@@ -13647,6 +13728,19 @@ export declare interface VXGIPostProcessingSettings {
|
|
|
13647
13728
|
updateOnChange: boolean;
|
|
13648
13729
|
}
|
|
13649
13730
|
|
|
13731
|
+
/** WebGPU 剖切状态:平面对象沿用 V2,模型裁剪由原生 ClippingGroup 接管。 */
|
|
13732
|
+
declare class WebGPUClippingState {
|
|
13733
|
+
readonly planes: THREE.Plane[];
|
|
13734
|
+
mode: ClippingMode;
|
|
13735
|
+
fillCutFace: boolean;
|
|
13736
|
+
private readonly engine;
|
|
13737
|
+
constructor(engine: any, planes: THREE.Plane[]);
|
|
13738
|
+
/** 将当前模式的平面同步到所有模型根节点。平面对象不复制,V2 拖动后可立即生效。 */
|
|
13739
|
+
apply(): void;
|
|
13740
|
+
clear(): void;
|
|
13741
|
+
getActivePlanes(): THREE.Plane[];
|
|
13742
|
+
}
|
|
13743
|
+
|
|
13650
13744
|
/** 一次性更新多个后期效果,避免质量档切换时重复重建节点图。 */
|
|
13651
13745
|
declare interface WebGPUPostProcessingConfiguration {
|
|
13652
13746
|
effects?: Partial<EffectState>;
|
|
@@ -13682,6 +13776,31 @@ export declare interface WebGPUPostProcessingSettings {
|
|
|
13682
13776
|
colorGrading: ColorGradingSettings;
|
|
13683
13777
|
}
|
|
13684
13778
|
|
|
13779
|
+
/**
|
|
13780
|
+
* V2 剖切框的完整交互实现:TransformControls、Ctrl 拾取、触摸长按、边界限制和比例回调均原样保留。
|
|
13781
|
+
* WebGPU 只替换最终的模型裁剪通道,避免重新实现已经验证过的交互逻辑。
|
|
13782
|
+
*/
|
|
13783
|
+
declare class WebGPUSectionBox extends SectionBox {
|
|
13784
|
+
private readonly webgpuState;
|
|
13785
|
+
private readonly interactionScene;
|
|
13786
|
+
constructor(engine: any, state: WebGPUClippingState);
|
|
13787
|
+
/** V2 每次重建六个面后同步 WebGPU ClippingGroup,并唤醒按需渲染。 */
|
|
13788
|
+
updata_face(box: any): void;
|
|
13789
|
+
/** 释放 V2 覆盖层,防止引擎销毁后控制器继续响应。 */
|
|
13790
|
+
dispose(): void;
|
|
13791
|
+
}
|
|
13792
|
+
|
|
13793
|
+
/** V2 剖切面的完整平移/旋转控制器实现,裁剪结果由 WebGPU 平面状态提供。 */
|
|
13794
|
+
declare class WebGPUSectionFace extends SectionFace {
|
|
13795
|
+
private readonly webgpuState;
|
|
13796
|
+
private readonly interactionScene;
|
|
13797
|
+
constructor(engine: any, state: WebGPUClippingState);
|
|
13798
|
+
/** V2 每次移动或旋转剖切面后同步 WebGPU 平面。 */
|
|
13799
|
+
updata_face(distance: any, planeCenter?: THREE.Vector3): void;
|
|
13800
|
+
/** 释放剖切面、平移控制器和旋转控制器。 */
|
|
13801
|
+
dispose(): void;
|
|
13802
|
+
}
|
|
13803
|
+
|
|
13685
13804
|
/**
|
|
13686
13805
|
* 世界坐标与屏幕坐标转换工具类
|
|
13687
13806
|
* 提供世界坐标(3D空间坐标)与屏幕坐标(2D像素坐标)之间的双向转换功能
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iflow-engine-base",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.10",
|
|
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",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"build:720": "vite build --mode 720",
|
|
43
43
|
"build:gis": "vite build --mode gis",
|
|
44
44
|
"test:v3-ordinary-mesh": "node --experimental-strip-types --test scripts/check-v3-ordinary-mesh-optimization.mjs",
|
|
45
|
+
"test:v3-sky": "node --experimental-strip-types --test scripts/check-v3-sky-manager.mjs",
|
|
45
46
|
"test:v2-mobile-memory": "node --experimental-strip-types --test scripts/check-v2-mobile-memory-profile.mjs",
|
|
46
47
|
"build:dwg-preview": "vite build --mode 2d",
|
|
47
48
|
"build:2d": "vite build --mode 2d",
|