iflow-engine-base 2.0.2 → 2.0.4
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/assets/ground//346/267/267/345/207/235/345/234/23749.jpg +0 -0
- package/dist/assets/ground//350/212/261/350/215/21103.jpg +0 -0
- package/dist/assets/hdr//345/237/216/345/270/202/346/210/267/345/244/226/345/244/251/347/251/272-/346/227/240/344/272/221.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/344/270/255/344/272/221.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/345/244/232/344/272/221.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/345/244/234/346/231/232.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/345/260/221/344/272/221.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/346/227/240/344/272/221.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/350/220/275/346/227/245.hdr +0 -0
- package/dist/assets/hdr//347/272/257/345/207/200-/351/230/264/345/244/251.hdr +0 -0
- package/dist/bim-engine-sdk.es.js +4574 -3569
- package/dist/bim-engine-sdk.es.js.map +1 -1
- package/dist/bim-engine-sdk.umd.js +314 -21
- package/dist/bim-engine-sdk.umd.js.map +1 -1
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +176 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
.originRotate{width:10px;height:10px;background-color:red}.versionText{position:absolute;right:10px;color:#86d9ff;z-index:1000;bottom:10px;background:transparent;pointer-events:none}.originDiv{position:absolute;top:100px;left:100px;width:30px;height:30px;border-radius:50%;z-index:1000;pointer-events:none}.catchPoint{pointer-events:none;stroke:#08dfd7;fill:transparent;stroke-width:2}.catchLine{position:absolute;width:10px;height:10px;pointer-events:none;background-color:green}.catchPlane{position:absolute;width:10px;height:10px;pointer-events:none;background-color:#ff0}.ViewCube{position:absolute;width:120px;height:120px;top:0;right:0;z-index:999}.homeViewWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-image:url(/assets/viewcube/home.png);background-size:100% 100%;background-repeat:no-repeat;background-color:#fff0;color:#fff;top:10px;right:100;width:20px;height:20px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.viewSettingWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-size:100% 100%;background-repeat:no-repeat;font-weight:800;background-color:#fff0;color:#fff;top:30px;right:100;width:20px;height:20px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cameraToggleWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:26px;font-weight:700;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:70px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cameraToggleWrapper.show{display:flex}.cameraToggleWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.screenshotWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:20px;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:120px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.screenshotWrapper.show{display:flex}.screenshotWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.fullscreenWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:26px;font-weight:700;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:170px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.fullscreenWrapper.show{display:flex}.fullscreenWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.measure-elevation{position:absolute;pointer-events:none}.measureSvg{position:absolute;width:1920px;height:1080px}.catch-point{position:absolute;width:10px;height:10px;background-color:red;border-radius:50%;pointer-events:none}.annotation-container{position:absolute;pointer-events:none;top:0;left:0}.measureLine{position:absolute;pointer-events:none}.measureBack{cursor:pointer;pointer-events:auto;fill:orange;top:-50px;rx:5;ry:5}.measureLabel{position:absolute;fill:#fff;font-size:14px;font-family:Arial,sans-serif;pointer-events:none}.measurePointer{fill:orange}.Hight{stroke:#fff;stroke-width:2}.allow-select{pointer-events:auto}.disallow-select{pointer-events:none}.angle-annotation{position:absolute;pointer-events:auto}
|
|
1
|
+
.originRotate{width:10px;height:10px;background-color:red}.versionText{position:absolute;right:10px;color:#86d9ff;z-index:1000;bottom:0;font-size:10px;background:transparent;pointer-events:none}.originDiv{position:absolute;top:100px;left:100px;width:30px;height:30px;border-radius:50%;z-index:1000;pointer-events:none}.catchPoint{pointer-events:none;stroke:#08dfd7;fill:transparent;stroke-width:2}.catchLine{position:absolute;width:10px;height:10px;pointer-events:none;background-color:green}.catchPlane{position:absolute;width:10px;height:10px;pointer-events:none;background-color:#ff0}.ViewCube{position:absolute;width:120px;height:120px;top:0;right:0;z-index:999}.homeViewWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-image:url(/assets/viewcube/home.png);background-size:100% 100%;background-repeat:no-repeat;background-color:#fff0;color:#fff;top:10px;right:100;width:20px;height:20px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.viewSettingWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-size:100% 100%;background-repeat:no-repeat;font-weight:800;background-color:#fff0;color:#fff;top:30px;right:100;width:20px;height:20px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cameraToggleWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:26px;font-weight:700;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:70px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.cameraToggleWrapper.show{display:flex}.cameraToggleWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.screenshotWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:20px;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:120px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.screenshotWrapper.show{display:flex}.screenshotWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.fullscreenWrapper{position:absolute;cursor:pointer;pointer-events:auto;background-color:#ffffffe6;color:#333;font-size:26px;font-weight:700;display:none;align-items:center;justify-content:center;border-radius:4px;box-shadow:0 2px 4px #0003;transition:all .3s ease;top:170px;right:90px;width:44px;height:44px;z-index:999;user-select:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}.fullscreenWrapper.show{display:flex}.fullscreenWrapper:hover{background-color:#fff;box-shadow:0 3px 6px #0000004d;transform:scale(1.1)}.measure-elevation{position:absolute;pointer-events:none}.measureSvg{position:absolute;width:1920px;height:1080px}.catch-point{position:absolute;width:10px;height:10px;background-color:red;border-radius:50%;pointer-events:none}.annotation-container{position:absolute;pointer-events:none;top:0;left:0}.measureLine{position:absolute;pointer-events:none}.measureBack{cursor:pointer;pointer-events:auto;fill:orange;top:-50px;rx:5;ry:5}.measureLabel{position:absolute;fill:#fff;font-size:14px;font-family:Arial,sans-serif;pointer-events:none}.measurePointer{fill:orange}.Hight{stroke:#fff;stroke-width:2}.allow-select{pointer-events:auto}.disallow-select{pointer-events:none}.angle-annotation{position:absolute;pointer-events:auto}
|
package/dist/index.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ declare class ComposerModule {
|
|
|
143
143
|
private engine;
|
|
144
144
|
composer: any;
|
|
145
145
|
private saturationPass;
|
|
146
|
+
private ssaoPass;
|
|
146
147
|
constructor(engine: any);
|
|
147
148
|
resize(width?: number, height?: number): void;
|
|
148
149
|
init(): void;
|
|
@@ -242,6 +243,17 @@ declare class EngineKernelV2 {
|
|
|
242
243
|
private controlsEnabledBeforePause;
|
|
243
244
|
private animate;
|
|
244
245
|
private onWindowResize;
|
|
246
|
+
private _fpsFrameCount;
|
|
247
|
+
private _fpsLastCheck;
|
|
248
|
+
private _fpsLastSwitch;
|
|
249
|
+
private _lowFpsCount;
|
|
250
|
+
private _highFpsCount;
|
|
251
|
+
private readonly _fpsCheckInterval;
|
|
252
|
+
private readonly _fpsSwitchCooldown;
|
|
253
|
+
private readonly _fpsThreshold;
|
|
254
|
+
private readonly _fpsUpgradeThreshold;
|
|
255
|
+
private readonly _lowFpsRequired;
|
|
256
|
+
private readonly _highFpsRequired;
|
|
245
257
|
isMouseDown: boolean;
|
|
246
258
|
isWheeling: boolean;
|
|
247
259
|
scene: THREE.Scene | null;
|
|
@@ -283,15 +295,27 @@ declare class EngineKernelV2 {
|
|
|
283
295
|
grid: Grid;
|
|
284
296
|
level: Level;
|
|
285
297
|
text: Text_2;
|
|
298
|
+
hdr: Hdr;
|
|
299
|
+
ground: Ground;
|
|
286
300
|
models: any[];
|
|
287
301
|
reactBoundingClientRect: {
|
|
288
302
|
left: number;
|
|
289
303
|
top: number;
|
|
290
304
|
};
|
|
291
305
|
version: string;
|
|
306
|
+
private versionEl;
|
|
292
307
|
private container;
|
|
293
308
|
constructor(options: any);
|
|
309
|
+
updateVersionDisplay(): void;
|
|
294
310
|
updateLightPosition(camera: any, directionalLight: any): void;
|
|
311
|
+
/**
|
|
312
|
+
* 自适应渲染降级:将渲染模式降低一级
|
|
313
|
+
*/
|
|
314
|
+
private _adaptiveRenderingDowngrade;
|
|
315
|
+
/**
|
|
316
|
+
* 自适应渲染升级:将渲染模式提升一级
|
|
317
|
+
*/
|
|
318
|
+
private _adaptiveRenderingUpgrade;
|
|
295
319
|
/**
|
|
296
320
|
* 暂停渲染循环
|
|
297
321
|
*/
|
|
@@ -325,7 +349,9 @@ declare class EngineKernelV2 {
|
|
|
325
349
|
declare class EngineModelModule {
|
|
326
350
|
private engine;
|
|
327
351
|
private currentMode;
|
|
352
|
+
private isManualMode;
|
|
328
353
|
private gtaoPass;
|
|
354
|
+
private ssaoPass;
|
|
329
355
|
private saturationPass;
|
|
330
356
|
private outputPass;
|
|
331
357
|
private fxaaPass;
|
|
@@ -335,7 +361,25 @@ declare class EngineModelModule {
|
|
|
335
361
|
*/
|
|
336
362
|
init(): void;
|
|
337
363
|
/**
|
|
338
|
-
*
|
|
364
|
+
* 手动切换渲染模式(用户调用),锁定自动适配
|
|
365
|
+
* @param model - "simple"(性能) | "balance"(平衡) | "advanced"(效果)
|
|
366
|
+
*/
|
|
367
|
+
switchModel(model: string): void;
|
|
368
|
+
/**
|
|
369
|
+
* 自动切换渲染模式(引擎内部调用),若已手动设置则跳过
|
|
370
|
+
* @param model - "simple"(性能) | "balance"(平衡) | "advanced"(效果)
|
|
371
|
+
*/
|
|
372
|
+
autoSwitch(model: string): void;
|
|
373
|
+
/**
|
|
374
|
+
* 恢复自动适配模式(解除手动锁定)
|
|
375
|
+
*/
|
|
376
|
+
enableAutoMode(): void;
|
|
377
|
+
/**
|
|
378
|
+
* 是否处于手动锁定模式
|
|
379
|
+
*/
|
|
380
|
+
get isManual(): boolean;
|
|
381
|
+
/**
|
|
382
|
+
* 设置模式(内部初始化使用,不影响手动锁定状态)
|
|
339
383
|
* @param model - "simple"(性能) | "balance"(平衡) | "advanced"(效果)
|
|
340
384
|
*/
|
|
341
385
|
setMode(model: string): void;
|
|
@@ -347,7 +391,7 @@ declare class EngineModelModule {
|
|
|
347
391
|
* 缓存 Pass 引用
|
|
348
392
|
*/
|
|
349
393
|
private cachePassReferences;
|
|
350
|
-
private
|
|
394
|
+
private applyMode;
|
|
351
395
|
/**
|
|
352
396
|
* 设置阴影开关
|
|
353
397
|
*/
|
|
@@ -356,6 +400,10 @@ declare class EngineModelModule {
|
|
|
356
400
|
* 设置环境光遮蔽 (GTAO) 开关
|
|
357
401
|
*/
|
|
358
402
|
private setGTAO;
|
|
403
|
+
/**
|
|
404
|
+
* 设置环境光遮蔽 (SSAO) 开关
|
|
405
|
+
*/
|
|
406
|
+
private setSSAO;
|
|
359
407
|
/**
|
|
360
408
|
* 设置饱和度 Pass 开关
|
|
361
409
|
*/
|
|
@@ -377,9 +425,13 @@ declare class EngineModelModule {
|
|
|
377
425
|
*/
|
|
378
426
|
setBalancedMode(): void;
|
|
379
427
|
/**
|
|
380
|
-
*
|
|
428
|
+
* 设置效果模式(SSAO)
|
|
381
429
|
*/
|
|
382
430
|
setQualityMode(): void;
|
|
431
|
+
/**
|
|
432
|
+
* 设置超高级模式(GTAO,最高质量)
|
|
433
|
+
*/
|
|
434
|
+
setSuperQualityMode(): void;
|
|
383
435
|
/**
|
|
384
436
|
* 设置阴影质量
|
|
385
437
|
* @param quality - "low"(1024) | "medium"(2048) | "high"(4096)
|
|
@@ -535,6 +587,58 @@ declare interface GridAxisPoint {
|
|
|
535
587
|
Z: number;
|
|
536
588
|
}
|
|
537
589
|
|
|
590
|
+
declare class Ground {
|
|
591
|
+
private engine;
|
|
592
|
+
private currentId;
|
|
593
|
+
private readonly groundGroup;
|
|
594
|
+
private groundMesh;
|
|
595
|
+
private waterMaterial;
|
|
596
|
+
private readonly clock;
|
|
597
|
+
private groundY;
|
|
598
|
+
private groundList;
|
|
599
|
+
constructor(engine: any);
|
|
600
|
+
init(): void;
|
|
601
|
+
/**
|
|
602
|
+
* 切换地面类型
|
|
603
|
+
* @param id 地面 id:"0" 无 | "1" 草地 | "2" 混凝土 | "3" 地砖 | "4" 湖面 | "5" 海面
|
|
604
|
+
*/
|
|
605
|
+
setGround(id: GroundId, config?: GroundConfig): void;
|
|
606
|
+
/**
|
|
607
|
+
* 设置地面高度(默认 0)
|
|
608
|
+
* @param y 世界空间 Y 坐标
|
|
609
|
+
*/
|
|
610
|
+
setHeight(y: number): void;
|
|
611
|
+
/** 获取当前地面高度 */
|
|
612
|
+
getHeight(): number;
|
|
613
|
+
private _createWaterMaterial;
|
|
614
|
+
/** 每帧调用,驱动水面动画 */
|
|
615
|
+
update(): void;
|
|
616
|
+
/** 获取地面列表(id + 名称) */
|
|
617
|
+
getGroundList(): Array<{
|
|
618
|
+
id: string;
|
|
619
|
+
name: string;
|
|
620
|
+
}>;
|
|
621
|
+
/** 获取当前地面 id */
|
|
622
|
+
getCurrentId(): GroundId;
|
|
623
|
+
show(): void;
|
|
624
|
+
hide(): void;
|
|
625
|
+
dispose(): void;
|
|
626
|
+
private _dispose;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
declare interface GroundConfig {
|
|
630
|
+
/** 地面尺寸(默认 300) */
|
|
631
|
+
size?: number;
|
|
632
|
+
/** 贴图 URL(仅实体地面有效) */
|
|
633
|
+
textureUrl?: string;
|
|
634
|
+
/** 阳光方向(默认斜上方) */
|
|
635
|
+
sunDirection?: THREE.Vector3;
|
|
636
|
+
/** 水面透明度(默认 0.82) */
|
|
637
|
+
opacity?: number;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
declare type GroundId = "0" | "1" | "2" | "3" | "4" | "5";
|
|
641
|
+
|
|
538
642
|
/**
|
|
539
643
|
* 行为处理器 - 管理引擎的交互行为(鼠标、键盘事件等)
|
|
540
644
|
* @param engine 引擎实例
|
|
@@ -542,6 +646,75 @@ declare interface GridAxisPoint {
|
|
|
542
646
|
*/
|
|
543
647
|
declare function HandelBehaved(engine: any): any;
|
|
544
648
|
|
|
649
|
+
declare class Hdr {
|
|
650
|
+
private engine;
|
|
651
|
+
private currentHdrId;
|
|
652
|
+
private isVisible;
|
|
653
|
+
private currentIntensity;
|
|
654
|
+
private currentTexture;
|
|
655
|
+
private skybox;
|
|
656
|
+
private readonly textureCache;
|
|
657
|
+
private readonly hdrList;
|
|
658
|
+
constructor(engine: any);
|
|
659
|
+
/**
|
|
660
|
+
* 获取 HDR 列表
|
|
661
|
+
*/
|
|
662
|
+
getHdrList(): HdrItem[];
|
|
663
|
+
/**
|
|
664
|
+
* 切换 HDR 背景
|
|
665
|
+
* @param id - HDR id,"0" 表示清除 HDR
|
|
666
|
+
*/
|
|
667
|
+
setHdr(id: string): Promise<void>;
|
|
668
|
+
/**
|
|
669
|
+
* 设置 HDR 天空球可见性(不影响环境光照)
|
|
670
|
+
* @param visible - true 显示,false 隐藏
|
|
671
|
+
*/
|
|
672
|
+
setVisible(visible: boolean): void;
|
|
673
|
+
/**
|
|
674
|
+
* 获取当前 HDR id
|
|
675
|
+
*/
|
|
676
|
+
getCurrentHdrId(): string;
|
|
677
|
+
/**
|
|
678
|
+
* 获取 HDR 背景是否可见
|
|
679
|
+
*/
|
|
680
|
+
getVisible(): boolean;
|
|
681
|
+
/**
|
|
682
|
+
* 设置 HDR 整体亮度
|
|
683
|
+
* @param intensity - 亮度倍率,1 为原始亮度,推荐范围 0.1 ~ 3
|
|
684
|
+
*/
|
|
685
|
+
setIntensity(intensity: number): void;
|
|
686
|
+
/**
|
|
687
|
+
* 获取当前 HDR 亮度
|
|
688
|
+
*/
|
|
689
|
+
getIntensity(): number;
|
|
690
|
+
/**
|
|
691
|
+
* 动态添加自定义 HDR 条目(用于外部扩展)
|
|
692
|
+
*/
|
|
693
|
+
addHdrItem(item: HdrItem): void;
|
|
694
|
+
/**
|
|
695
|
+
* 释放所有缓存纹理
|
|
696
|
+
*/
|
|
697
|
+
dispose(): void;
|
|
698
|
+
private _loadHdr;
|
|
699
|
+
private _applyTexture;
|
|
700
|
+
/**
|
|
701
|
+
* 创建超大天空球,兼容正交/透视两种相机
|
|
702
|
+
* - radius 5000:远超任何场景对象,确保始终在背景层
|
|
703
|
+
* - BackSide:从内部观察球面
|
|
704
|
+
* - depthWrite false + renderOrder -1:不写入深度缓冲,始终渲染在最底层
|
|
705
|
+
* - frustumCulled false:防止大球被裁剪掉
|
|
706
|
+
*/
|
|
707
|
+
private _createSkybox;
|
|
708
|
+
private _removeSkybox;
|
|
709
|
+
private _clearHdr;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
declare interface HdrItem {
|
|
713
|
+
id: string;
|
|
714
|
+
name: string;
|
|
715
|
+
url?: string;
|
|
716
|
+
}
|
|
717
|
+
|
|
545
718
|
declare class HoverHighLight {
|
|
546
719
|
private engine;
|
|
547
720
|
private overlayMaterial;
|
|
@@ -846,8 +1019,6 @@ declare class ModelToolModule {
|
|
|
846
1019
|
private highlightMaterial;
|
|
847
1020
|
private hideMaterial;
|
|
848
1021
|
private translucentMaterial;
|
|
849
|
-
private cloneModels;
|
|
850
|
-
private clonetranslucentModels;
|
|
851
1022
|
constructor(engine_: any);
|
|
852
1023
|
split_merge_model(model: any): void;
|
|
853
1024
|
un_split_merge_model(model: any): void;
|