iflow-engine-base 2.0.0 → 2.0.2
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 +4854 -4256
- package/dist/bim-engine-sdk.es.js.map +1 -1
- package/dist/bim-engine-sdk.umd.js +25 -25
- package/dist/bim-engine-sdk.umd.js.map +1 -1
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +159 -0
- package/dist/model0/info +0 -0
- package/dist/model0/lod0 +0 -0
- package/dist/model0/property +0 -0
- package/dist/model1/info +0 -0
- package/dist/model1/lod0 +0 -0
- package/dist/model1/property +0 -0
- package/package.json +1 -1
- package/dist/model/info +0 -0
- package/dist/model/lod0 +0 -0
- package/dist/model/property +0 -0
|
@@ -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;
|
|
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}
|
package/dist/index.d.ts
CHANGED
|
@@ -279,6 +279,10 @@ declare class EngineKernelV2 {
|
|
|
279
279
|
ai: AI;
|
|
280
280
|
pathRoaming: PathRoaming;
|
|
281
281
|
hoverHighLight: HoverHighLight;
|
|
282
|
+
minMap: MiniMap;
|
|
283
|
+
grid: Grid;
|
|
284
|
+
level: Level;
|
|
285
|
+
text: Text_2;
|
|
282
286
|
models: any[];
|
|
283
287
|
reactBoundingClientRect: {
|
|
284
288
|
left: number;
|
|
@@ -479,6 +483,58 @@ declare enum EventType {
|
|
|
479
483
|
SectionMove = "section-move"
|
|
480
484
|
}
|
|
481
485
|
|
|
486
|
+
declare class Grid {
|
|
487
|
+
private readonly engine;
|
|
488
|
+
private rootGroup;
|
|
489
|
+
private isVisible;
|
|
490
|
+
private axes;
|
|
491
|
+
/**
|
|
492
|
+
* 坐标转换:BIM(X,Y,Z) → Three.js 世界坐标
|
|
493
|
+
* 默认规则:BIM X=水平, Y=水平深度, Z=高度
|
|
494
|
+
* → Three.js X=水平, Y=高度, Z=-深度
|
|
495
|
+
* 可在外部替换此函数以适配不同坐标系。
|
|
496
|
+
*/
|
|
497
|
+
coordinateMapper: (p: GridAxisPoint) => THREE.Vector3;
|
|
498
|
+
constructor(engine: any);
|
|
499
|
+
/** 传入轴网数据并在场景中构建对象 */
|
|
500
|
+
setData(data: GridAxisData[]): void;
|
|
501
|
+
/** 使用内置模拟数据(调试用) */
|
|
502
|
+
setMockData(): void;
|
|
503
|
+
/** 显示轴网 */
|
|
504
|
+
show(): void;
|
|
505
|
+
/** 隐藏轴网 */
|
|
506
|
+
hide(): void;
|
|
507
|
+
/** 切换显示/隐藏 */
|
|
508
|
+
toggle(): void;
|
|
509
|
+
/**
|
|
510
|
+
* 每帧更新(在动画循环中调用)
|
|
511
|
+
* 根据正交相机缩放动态调整圆圈大小,保持屏幕上视觉尺寸恒定(约 30px)
|
|
512
|
+
*/
|
|
513
|
+
update(): void;
|
|
514
|
+
/** 销毁,释放 Three.js 资源 */
|
|
515
|
+
dispose(): void;
|
|
516
|
+
private _initRoot;
|
|
517
|
+
private _clearAxes;
|
|
518
|
+
private _buildAxis;
|
|
519
|
+
/**
|
|
520
|
+
* 创建带文字的圆圈 Sprite
|
|
521
|
+
* Sprite 默认朝向相机(billboard),depthTest=false 保证始终可见
|
|
522
|
+
*/
|
|
523
|
+
private _makeCircleSprite;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
declare interface GridAxisData {
|
|
527
|
+
Id: string;
|
|
528
|
+
Name: string;
|
|
529
|
+
Points: [GridAxisPoint, GridAxisPoint];
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
declare interface GridAxisPoint {
|
|
533
|
+
X: number;
|
|
534
|
+
Y: number;
|
|
535
|
+
Z: number;
|
|
536
|
+
}
|
|
537
|
+
|
|
482
538
|
/**
|
|
483
539
|
* 行为处理器 - 管理引擎的交互行为(鼠标、键盘事件等)
|
|
484
540
|
* @param engine 引擎实例
|
|
@@ -559,6 +615,7 @@ declare class InteractionModule {
|
|
|
559
615
|
handelKeyCtrlDown(): void;
|
|
560
616
|
private hoverOldId;
|
|
561
617
|
handleMouseMove(event: any): void;
|
|
618
|
+
getCatchMeshs(event: any): any;
|
|
562
619
|
handleMouseClick(event: any): void;
|
|
563
620
|
handleMouseDoubleClick(event: any): void;
|
|
564
621
|
handleMouseClickInstance(raycaster: any): any;
|
|
@@ -587,6 +644,45 @@ declare interface IRoamingPoint extends ICameraPose {
|
|
|
587
644
|
stayTime?: number;
|
|
588
645
|
}
|
|
589
646
|
|
|
647
|
+
declare class Level {
|
|
648
|
+
private engine;
|
|
649
|
+
private isVisible;
|
|
650
|
+
private levels;
|
|
651
|
+
private svgContainer;
|
|
652
|
+
private svgOverlay;
|
|
653
|
+
private worldToScreen;
|
|
654
|
+
halfSize: number;
|
|
655
|
+
private readonly COLOR;
|
|
656
|
+
private readonly PLANE_OPACITY;
|
|
657
|
+
constructor(engine: any);
|
|
658
|
+
private _initSvg;
|
|
659
|
+
/** 传入标高数据并渲染 */
|
|
660
|
+
setData(data: LevelData[]): void;
|
|
661
|
+
/** 使用内置模拟数据(调试用) */
|
|
662
|
+
setMockData(): void;
|
|
663
|
+
/** 显示标高 */
|
|
664
|
+
show(): void;
|
|
665
|
+
/** 隐藏标高 */
|
|
666
|
+
hide(): void;
|
|
667
|
+
/** 切换显示/隐藏 */
|
|
668
|
+
toggle(): void;
|
|
669
|
+
/** 每帧刷新(需在动画循环中调用) */
|
|
670
|
+
update(): void;
|
|
671
|
+
/** 销毁,释放资源 */
|
|
672
|
+
dispose(): void;
|
|
673
|
+
private _initWorldToScreen;
|
|
674
|
+
private _clearAll;
|
|
675
|
+
private _buildThreeObject;
|
|
676
|
+
private _updateSvgLabels;
|
|
677
|
+
private _makeLabel;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
declare interface LevelData {
|
|
681
|
+
Id: string;
|
|
682
|
+
Name: string;
|
|
683
|
+
Elevation: number;
|
|
684
|
+
}
|
|
685
|
+
|
|
590
686
|
declare class LightModule {
|
|
591
687
|
private engine;
|
|
592
688
|
constructor(engine: any);
|
|
@@ -652,15 +748,72 @@ declare interface Message {
|
|
|
652
748
|
content: string;
|
|
653
749
|
}
|
|
654
750
|
|
|
751
|
+
declare class MiniMap {
|
|
752
|
+
private engine;
|
|
753
|
+
private miniMapCamera;
|
|
754
|
+
private miniMapRenderer;
|
|
755
|
+
private miniMapContainer;
|
|
756
|
+
private overlayCanvas;
|
|
757
|
+
private overlayCtx;
|
|
758
|
+
private isVisible;
|
|
759
|
+
private readonly mapSize;
|
|
760
|
+
private currentHalfSize;
|
|
761
|
+
private readonly minHalfSize;
|
|
762
|
+
private readonly maxHalfSize;
|
|
763
|
+
private halfSizeInitialized;
|
|
764
|
+
private camY;
|
|
765
|
+
private centerX;
|
|
766
|
+
private centerZ;
|
|
767
|
+
private dragMode;
|
|
768
|
+
private lastMouseX;
|
|
769
|
+
private lastMouseY;
|
|
770
|
+
constructor(engine: any);
|
|
771
|
+
getstate(): boolean;
|
|
772
|
+
private init;
|
|
773
|
+
/**
|
|
774
|
+
* 世界坐标 XZ → 小地图像素坐标
|
|
775
|
+
* 小地图 up=(0,0,-1):-Z 朝屏幕上方,+X 朝屏幕右方
|
|
776
|
+
*/
|
|
777
|
+
private worldToPixel;
|
|
778
|
+
/** 小地图像素坐标 → 世界坐标 XZ */
|
|
779
|
+
private pixelToWorld;
|
|
780
|
+
private setupEvents;
|
|
781
|
+
/** 滚轮缩放小地图视野 */
|
|
782
|
+
private readonly onWheel;
|
|
783
|
+
/**
|
|
784
|
+
* 点击指示器(中心 25px 范围)→ 进入旋转拖拽模式
|
|
785
|
+
* 点击其他位置 → 计算世界坐标,直接将相机传送过去
|
|
786
|
+
*/
|
|
787
|
+
private readonly onMouseDown;
|
|
788
|
+
private readonly onMouseMove;
|
|
789
|
+
private readonly onMouseUp;
|
|
790
|
+
/**
|
|
791
|
+
* 传送:点击小地图空白区域 → 计算世界坐标,将相机和 target 平移过去
|
|
792
|
+
*/
|
|
793
|
+
private handleTeleport;
|
|
794
|
+
/**
|
|
795
|
+
* 旋转:拖动指示器尖端 → 绕 controls.target 旋转主相机水平轨道角
|
|
796
|
+
*/
|
|
797
|
+
private handleRotate;
|
|
798
|
+
private drawOverlay;
|
|
799
|
+
show(): void;
|
|
800
|
+
hide(): void;
|
|
801
|
+
toggle(): void;
|
|
802
|
+
update(): void;
|
|
803
|
+
dispose(): void;
|
|
804
|
+
}
|
|
805
|
+
|
|
655
806
|
declare class ModelEdge {
|
|
656
807
|
private engine;
|
|
657
808
|
private isActive;
|
|
658
809
|
private groupEdge;
|
|
659
810
|
private material;
|
|
811
|
+
private modelEdgeLoaded;
|
|
660
812
|
private indexes;
|
|
661
813
|
constructor(engine: any);
|
|
662
814
|
active(): void;
|
|
663
815
|
disActive(): void;
|
|
816
|
+
private loadModelEdge;
|
|
664
817
|
private show;
|
|
665
818
|
getModelEdge(url: string, id: Number): any;
|
|
666
819
|
hideModelEdge(url: string, id: Number): void;
|
|
@@ -1058,6 +1211,12 @@ declare interface Step {
|
|
|
1058
1211
|
apiModules: string[];
|
|
1059
1212
|
}
|
|
1060
1213
|
|
|
1214
|
+
declare class Text_2 {
|
|
1215
|
+
private engine;
|
|
1216
|
+
constructor(engine: any);
|
|
1217
|
+
update(): void;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1061
1220
|
declare class ViewCube {
|
|
1062
1221
|
private engine;
|
|
1063
1222
|
cubeTool: any;
|
package/dist/model0/info
ADDED
|
Binary file
|
package/dist/model0/lod0
ADDED
|
Binary file
|
|
Binary file
|
package/dist/model1/info
ADDED
|
Binary file
|
package/dist/model1/lod0
ADDED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
package/dist/model/info
DELETED
|
Binary file
|
package/dist/model/lod0
DELETED
|
Binary file
|
package/dist/model/property
DELETED
|
Binary file
|