bimwin-api
Version:
BIMWIN核心库, 使用typescript开发, 非LOD版本
1,671 lines (1,651 loc) • 192 kB
TypeScript
declare module 'bimwin-api/api/index' {
import { SelectedArg, RectSelectedArg } from "bimwin-api/api/types/BwEventTypes";
import { ISecret, UIOptions, BWOptions, BimType, Theme, ModelOptions } from "bimwin-api/api/types/BWOptions";
import { PropertyKeyValue } from "bimwin-api/api/types/ElementTypes";
import { Element } from "bimwin-api/api/packages/Element";
import { SectionBox } from "bimwin-api/bimwin/entry";
import { Information } from "bimwin-api/api/packages/Infomation";
import { HtmlBindHandle } from "bimwin-api/bimwin/entry";
import { SlideSelection } from "bimwin-api/bimwin/entry";
import { Octree } from "bimwin-api/bimwin/tool/Octree/Octree";
import { Effect } from "bimwin-api/api/packages/Effect";
import { ServiceAgent, Service } from "bimwin-api/api/packages/Service";
import { ToolKit } from "bimwin-api/api/packages/ToolKit";
import { NavigationMode, NavigationControls } from "bimwin-api/bimwin/camera/navigationControls";
import { BombType, BomberBase, FloorByElevationBomber, AxisType, SphericalBomber, FloorByGroupsBomber, ScheduleArg, BombArgs, CubicBomber, ArrangedBomber, ScheduleBomber, ScheduleGroupBomber } from "bimwin-api/bimwin/component/bomb";
import { ComponentBase } from "bimwin-api/bimwin/component/componentBase";
import { navbase } from "bimwin-api/bimwin/component/navigateAxis/navaxis.base";
import { CUTMODEL } from "bimwin-api/bimwin/component/sectionBox";
import { SelectMode, ViewDirection, IVector3, SceneLoadOption3D, WalkthroughOption, Layout, Color4, PickModel, CameraData, WalkthroughKeyFrame, LayoutViewPort, CameraControlsType, SceneLoadProgress, BIMWinCamera, CameraType, IVector4, IColor, SceneLoadOption2D, SectionData, LightAttr, CameraViewPort, NodeMeshItem } from "bimwin-api/bimwin/types";
import { Event, Delegate } from "bimwin-api/bimwin/event";
import { LineMaterialParameters, LineMaterial } from "bimwin-api/bimwin/lineMesh/lineMaterial";
import { LineSegmentsGeometry } from "bimwin-api/bimwin/lineMesh/lineSegmentsGeometry";
import { OctDataKey, OctDataCollection, LineBufferGeometryOctData, OctData, MeshBufferGeometryOctData } from "bimwin-api/bimwin/tool/Octree/OctData";
import { Annotation } from "bimwin-api/api/packages/Annotation";
import { Label } from "bimwin-api/api/packages/Label";
import { Roam } from "bimwin-api/api/packages/Roam";
import { ITransferredLabelData } from "bimwin-api/api/types/LabelTypes";
import { EditorControls } from "bimwin-api/bimwin/camera/editorControls";
import { Image3D } from "bimwin-api/bimwin/component/image3d";
import { Measure2DTool } from "bimwin-api/bimwin/entry";
import { measurementType, MeasureTool } from "bimwin-api/bimwin/component/measureTool";
import { InitMouseEvent2D } from "bimwin-api/bimwin/component/mouseEvent2D";
import { OutlineNode } from "bimwin-api/bimwin/component/OutlineNode";
import { BoundingBox } from "bimwin-api/bimwin/core/boundingBox";
import { SharedMeshBlock, SharedContourBlock } from "bimwin-api/bimwin/core/SharedMeshBlock";
import { Node, MeshIndexSegment, StaticMeshBlock, PriType, Mesh, StaticLineMeshBlock } from "bimwin-api/bimwin/core/staticMeshBlock";
import { StaticScene } from "bimwin-api/bimwin/core/staticScene";
import { CompressV1, StaticScene3D } from "bimwin-api/bimwin/core/staticScene3d";
import { DebugLine, DebugBox } from "bimwin-api/bimwin/debug";
import { RoamMap } from "bimwin-api/bimwin/entry";
import { worker } from "bimwin-api/bimwin/tool/download.worker";
import { Group, Sequence } from "bimwin-api/bimwin/tool/tween";
import { isArray, mergeBufferGeometries, getCookie, textureToUrl, chooseTypedArray, uuid, getAllCookies } from "bimwin-api/bimwin/utils/index";
import { MeshPhongMaterial } from "bimwin-api/BRender/MeshPhongMaterial";
import { BwEvent } from "bimwin-api/api/packages/BwEvent";
import { Camera } from "bimwin-api/api/packages/Camera";
import { Light } from "bimwin-api/api/packages/Light";
import { ModelId, Manifest, ModelNodes, Model } from "bimwin-api/api/packages/Model";
import { Property } from "bimwin-api/api/packages/Property";
import { Util } from "bimwin-api/api/packages/Util";
import { Platform } from "bimwin-api/api/Platform";
import { BIMWin2D } from "bimwin-api/bimwin/entry";
import { BIMWin3D } from "bimwin-api/bimwin/entry";
import { Controls } from "bimwin-api/bimwin/camera/base";
import { EditorControls2D } from "bimwin-api/bimwin/camera/editorControls2D";
import { HoverNode } from "bimwin-api/bimwin/component/hoverNode";
import { Map2D } from "bimwin-api/bimwin/component/map2d";
import { Map3D } from "bimwin-api/bimwin/entry";
import { SVGManager } from "bimwin-api/bimwin/component/measureSvg";
import { InitMouseEvent3D } from "bimwin-api/bimwin/component/mouseEvent3D";
import { navdir } from "bimwin-api/bimwin/component/navigateAxis/navaxis.dir";
import { NavigateAxis } from "bimwin-api/bimwin/component/navigateAxis/navigateAxis";
import { RectSelection } from "bimwin-api/bimwin/component/rectSelection";
import { Intersection, IdKey, UniqueId, Common, PrimitiveType, PositionSet } from "bimwin-api/bimwin/tool/Octree/OctreeCommon";
import { applyClippingPlanes, ExtraParameters, intersectsInstancedMesh, intersectsMesh, intersectsLineMesh, intersectionLine } from "bimwin-api/bimwin/core/intersect";
import { MaterialManager } from "bimwin-api/bimwin/core/materialManager";
import { InstancedLineMaterial } from "bimwin-api/bimwin/core/share/InstancedLineMaterial";
import { FSharedBaseNode, FSharedNode, FSharedBaseNodeFile, FSharedFileIndex } from "bimwin-api/bimwin/core/share/SharedIndex";
import { SharedNode } from "bimwin-api/bimwin/core/share/SharedNode";
import { StaticScene2D } from "bimwin-api/bimwin/core/staticScene2d";
import { StaticScene3D_Shared } from "bimwin-api/bimwin/core/staticScene3d.shared";
import { BinaryReader } from "bimwin-api/bimwin/tool/binaryReader";
import { ShapeBox2d, TweenAnimation, UniqueProducer } from "bimwin-api/bimwin/tool/common";
import { _FileCache, FileCache } from "bimwin-api/bimwin/tool/FileCache";
import { FileTool } from "bimwin-api/bimwin/tool/fileTool";
import { BwMeshOctData, BwLineOctData } from "bimwin-api/bimwin/tool/Octree/BwOctData";
import { Octant } from "bimwin-api/bimwin/tool/Octree/Octant";
import { BRender, BScene } from "bimwin-api/BRender/BRender";
import { DirectionalLight } from "bimwin-api/BRender/Light";
import { LineBaseMaterial } from "bimwin-api/BRender/LineBaseMaterial";
import * as THREE from "three";
export { SelectedArg, RectSelectedArg, ISecret, UIOptions, BWOptions, BimType, Theme, ModelOptions, PropertyKeyValue, Element, SectionBox, Information, HtmlBindHandle, SlideSelection, Octree, Effect, ServiceAgent, Service, ToolKit, NavigationMode, NavigationControls, BombType, BomberBase, FloorByElevationBomber, AxisType, SphericalBomber, FloorByGroupsBomber, ScheduleArg, BombArgs, CubicBomber, ArrangedBomber, ScheduleBomber, ScheduleGroupBomber, ComponentBase, navbase, CUTMODEL, SelectMode, ViewDirection, IVector3, SceneLoadOption3D, WalkthroughOption, Layout, Color4, PickModel, CameraData, WalkthroughKeyFrame, LayoutViewPort, CameraControlsType, SceneLoadProgress, BIMWinCamera, CameraType, IVector4, IColor, SceneLoadOption2D, SectionData, LightAttr, CameraViewPort, NodeMeshItem, Event, Delegate, LineMaterialParameters, LineMaterial, LineSegmentsGeometry, OctDataKey, OctDataCollection, LineBufferGeometryOctData, OctData, MeshBufferGeometryOctData, Annotation, Label, Roam, ITransferredLabelData, EditorControls, Image3D, Measure2DTool, measurementType, MeasureTool, InitMouseEvent2D, OutlineNode, BoundingBox, SharedMeshBlock, SharedContourBlock, Node, MeshIndexSegment, StaticMeshBlock, PriType, Mesh, StaticLineMeshBlock, StaticScene, CompressV1, StaticScene3D, DebugLine, DebugBox, RoamMap, worker, Group, Sequence, isArray, mergeBufferGeometries, getCookie, textureToUrl, chooseTypedArray, uuid, getAllCookies, MeshPhongMaterial, BwEvent, Camera, Light, ModelId, Manifest, ModelNodes, Model, Property, Util, Platform, BIMWin2D, BIMWin3D, Controls, EditorControls2D, HoverNode, Map2D, Map3D, SVGManager, InitMouseEvent3D, navdir, NavigateAxis, RectSelection, Intersection, IdKey, UniqueId, Common, PrimitiveType, PositionSet, applyClippingPlanes, ExtraParameters, intersectsInstancedMesh, intersectsMesh, intersectsLineMesh, intersectionLine, MaterialManager, InstancedLineMaterial, FSharedBaseNode, FSharedNode, FSharedBaseNodeFile, FSharedFileIndex, SharedNode, StaticScene2D, StaticScene3D_Shared, BinaryReader, ShapeBox2d, TweenAnimation, UniqueProducer, _FileCache, FileCache, FileTool, BwMeshOctData, BwLineOctData, Octant, BRender, BScene, DirectionalLight, LineBaseMaterial, THREE, };
}
declare module 'bimwin-api/api/packages/Annotation' {
import Arrow from 'bimwin-api/components/Annotation/arrow.js';
import Cloud from 'bimwin-api/components/Annotation/cloud.js';
import Ellipse from 'bimwin-api/components/Annotation/ellipse.js';
import FreeDraw from 'bimwin-api/components/Annotation/freeDraw.js';
import Line from 'bimwin-api/components/Annotation/line.js';
import Rect from 'bimwin-api/components/Annotation/rect.js';
import Text from 'bimwin-api/components/Annotation/text.js';
import X from 'bimwin-api/components/Annotation/x.js';
import Konva from 'konva';
import * as THREE from 'three';
import { Platform } from 'bimwin-api/api/Platform';
interface positionType {
postions?: number[];
postionsStart?: number[];
postionsEnd?: number[];
element?: Rect | Line | Arrow | Ellipse | FreeDraw | Text | Cloud | X;
name?: string;
instance?: Rect | Line | Arrow | Ellipse | FreeDraw | Text | Cloud | X;
XY?: THREE.Vector3;
initXY?: THREE.Vector3;
}
export class Annotation {
private platform;
stage: Konva.Stage;
layer: Konva.Layer;
activeImages: string;
shapesAnno: (Rect | Line | Arrow | Ellipse | FreeDraw | Text | Cloud | X)[];
postions3D: positionType[];
Rect: Rect;
color: string;
width: number;
Line: Line;
Arrow: Arrow;
Noval: Ellipse;
FreeDraw: FreeDraw;
Ntext: Text;
fontSize: number;
Ncloud: Cloud;
Mark: X;
drawClass: string;
bimwinName: HTMLDivElement;
tip: HTMLDivElement;
constructor(platform: Platform);
/**
* 更改粗细度
*/
changeThickness(num?: number): void;
/**
* 更改字体大小
*/
changeFontSize(num?: number): void;
/**
* 更改颜色
* @param {string} value hex字符串 不支持纯数字
*/
changeColor(value: string): void;
/**
* 创建画板
*/
private createDrawingBoard;
/**
* 绘图事件绑定
*/
bindingEven(): {
Rect: () => Rect;
Line: () => Line;
Arrow: () => Arrow;
Noval: () => Ellipse;
FreeDraw: () => FreeDraw;
Ntext: () => Text;
Ncloud: () => Cloud;
Mark: () => X;
};
/**
* 停止对应事件
*/
stopEven(type: string): void;
/**
* 切换类型
*/
switchType(type: string): void;
/**
* 画形状
*/
drawShape(type: any): void;
/**
* 图形重绘
*/
repaint(type: any): void;
/**
* 保存截图
* @param fillStyle canvas背景
* @returns string
*/
saveImage(fillStyle: string | CanvasGradient): string;
cancelAnnotation(): void;
/** 批注清除 */
eliminate(): void;
/**
* 储存图形二维点变为三维点(线)
*/
private transformation;
/**
* 储存图形二维点变为三维点(矩形)
*/
private transformationOther;
}
export {};
}
declare module 'bimwin-api/api/packages/BwEvent' {
import { Delegate } from 'bimwin-api/bimwin/event';
import { Platform } from 'bimwin-api/api/Platform';
import { BIMWin3D } from 'bimwin-api/bimwin/bimwin3d';
import { RectSelectedArg, SelectedArg } from 'bimwin-api/api/types/BwEventTypes';
import { BIMWin2D } from 'bimwin-api/bimwin/bimwin2d';
/** 常用事件 */
export class BwEvent {
_platform: Platform;
OnPropertyLoaded: Delegate<any>;
OnLabelSaving: Delegate<any>;
OnSelected: Delegate<SelectedArg>;
OnMounted: Delegate<HTMLDivElement>;
OnBwCreated: Delegate<BIMWin2D | BIMWin3D>;
OnRectSelected: Delegate<RectSelectedArg>;
constructor(platform: Platform);
/**
* 初始化
*/
Init(): void;
}
}
declare module 'bimwin-api/api/packages/Camera' {
import * as THREE from "three";
import { Platform } from 'bimwin-api/api/Platform';
import { CameraType } from 'bimwin-api/bimwin/types';
export class Camera {
private _platform;
constructor(platform: Platform);
/**
* 获取相机参数
*/
ExtractCamera(): any;
/**
* 设置相机
* @returns cameraData playAnimationTime
*/
SetCamera(cameraData: any, playAnimationTime?: number): void;
/**
* 恢复主视角
* @returns
*/
RestoreHome(): any;
/**
* 设置视角
* @returns viewDirection 相机视角类型
*/
SetViewDirection(viewDirection: any, playAnimation: Boolean): any;
/**
* 保存场景图片(返回base64格式)
* @returns
*/
SaveScreenImage(): any;
/**
* 切换相机类型
* @param type 相机类型: 'perspective': 透视相机, 'orthographic': 正交相机
* @returns
*/
switchCameraType(type: CameraType): void;
/**
* 获取当前相机类型
* @returns 相机类型('perspective'/'orthographic')
*/
getCameraType(): "perspective" | "orthographic";
/**
* 解析JSON至ViewData
* @param data
* @returns
*/
parseImportViewData(data: string): {
id: string;
name: any;
shortcut: any;
cameraData: {
cameraType: any;
position: THREE.Vector3;
rotation: THREE.Euler;
left: any;
top: any;
bottom: any;
right: any;
controlsType: any;
};
};
/**
* 相机定位
* @param postion dgn原始坐标
* @param target dgn原始坐标
* @param up 上方向,原坐标
* @param useOffset 使用偏移
*/
LookAt(position: THREE.Vector3 | [number, number, number], target: THREE.Vector3 | [number, number, number], up: THREE.Vector3 | [number, number, number], useOffset?: boolean): void;
/**
* revit坐标定位(正交视图下)
* @param origin 相机原始坐标
* @param up 相机上方向原始坐标
* @param right 相机右方向原始坐标
* @param view 从屏幕里指向外的坐标(与相机朝向相反)
*/
LookAtRevit(origin: Array<number>, up: Array<number>, right: Array<number>, view: Array<number>): void;
}
}
declare module 'bimwin-api/api/packages/Effect' {
import { Platform } from "bimwin-api/api/Platform";
export class Effect {
private _bimwin;
private _ambient;
private _specular;
private _directionalLightStrength;
private _enableShadow;
private _shadowStrength;
private _enableSpecularAttenuation;
constructor(platform: Platform);
private _sceneTraverse;
get ambient(): number;
set ambient(val: number);
get specular(): number;
set specular(val: number);
get shadowStrength(): number;
set shadowStrength(value: number);
get enableSpecularAttenuation(): boolean;
set enableSpecularAttenuation(v: boolean);
get enableShadow(): boolean;
set enableShadow(val: boolean);
get directionalLightStrength(): number;
set directionalLightStrength(val: number);
}
}
declare module 'bimwin-api/api/packages/Element' {
import { BombArgs, BomberBase, BombType } from 'bimwin-api/bimwin/component/bomb';
import { Platform } from 'bimwin-api/api/Platform';
/** 构件方法 */
export class Element {
private _platform;
constructor(platform: Platform);
/**
* 最大化构件
* @param ids 构件集合
* @param isHighlight 是否高亮
* @param ratio 放大率[0.0 - 1.0],0.5标准
*/
FitElements(ids: string[], isHighlight: boolean, ratio?: number): void;
/**
* 获取所有构件
* @returns
*/
GetModelElements(): Promise<any[]>;
GetModelIds(): string[];
/**
* 高亮构件集合
* @param ids
* @param enable true:高亮;false:取消高亮
*/
HighlightElements(ids: string[], enable?: boolean): void;
/**
* 使构件集合透明,透明度全局只有一种
* @param ids
* @param enable true:启用透明;false:取消透明
* @param rate 透明度 [0,1], 0 完全透明,1 不透明
*/
TransparentElements(ids: string[], enable?: boolean, value?: number): void;
/**
* 使构件有不同的透明度
* @param ids
* @param enable true:启用透明;false:取消透明
* @param rate 透明度 [0,1], 0 完全透明,1 不透明
*/
TransparentElementsMulti(ids: string[], enable?: boolean, value?: number): void;
/**
* 获取构件内容
* @param id
*/
ExtractElement(id: string): any;
/**
* 获取所有构件内容
*/
ExtractElementsInModel(): void;
/**
* 设置构件颜色
* @param ids
* @param color
* @param enable
*/
SetColorElements(ids: string[], color: string, enable: boolean): void;
/**
* 获得构件几何
* @param id
*/
ExtractElementGeometry(id: any): void;
/**
* 修改构件几何
* @param id
* @param color
* @param index
* @param positions
*/
ModifyElementGeometry(id: any, color: any, index: any, positions: any): void;
/**
* 隐藏显示构件
* @param ids
* @param enable
*/
ShowElement(ids: any, enable: any): void;
/**
* 构件半透明
* @param ids
* @param enable
*/
HalfTransparentElement(ids: any, enable: any): void;
/**
* 设置构件半透明度
* @param ids
* @param alpha
*/
SetAlphaElement(ids: any, alpha: any): void;
/**
* 添加构件
*/
AddElement(): void;
/**
* 炸开元素集合
* @param bombType
* @param arg
* @returns
*
* 示例:
* let bomb = scene.bimwin.BombNodes(1, {Groups: scene.Element.GetModelIds(), Continuous: true, MilliSecond: 2000, Bomb: true, Explosive: 1.25});
*
*
*/
BombElements(bombType: BombType, arg: BombArgs): BomberBase;
/**
* 闪烁构件
* @param ids 构件集合
* @param color 颜色
* @param speed 速度
* @param enable 闪烁或关闭闪烁
*/
BlinkElements(ids: string[] | string, color: number | string, speed?: number, enable?: boolean): void;
}
}
declare module 'bimwin-api/api/packages/Infomation' {
import { Platform } from "bimwin-api/api/Platform";
export class Information {
platform: Platform;
constructor(platform: Platform);
/**
* 获取基本信息
* @returns
*/
getBaseInformation(): {
nodeNum: number;
meshNum: number;
pointNum: number;
lineNum: number;
};
}
}
declare module 'bimwin-api/api/packages/Label' {
import * as THREE from 'three';
import { Platform } from 'bimwin-api/api/Platform';
import { ITransferredLabelData } from "bimwin-api/api/types/LabelTypes";
type LabelId = number;
enum LabelTypes {
default = "default",
balloon = "balloon",
diffusion = "diffusion"
}
/** 标签 */
export class Label {
private _platform;
/** 标签列表 */
private handles;
private typesMap;
/** 标签容器 */
private get hostDom();
/** 构造函数 */
constructor(platform: Platform);
/**
* 添加自定义标签
* @param type
* @param pos
* @param value
*/
AddLabel(pos: THREE.Vector3, htmlText: string): LabelId;
AddLabelToElement(elementId: string, htmlText: string): LabelId;
/**
* 移除标签集合
* @param lids
*/
RemoveLabels(lids: LabelId[] | undefined): void;
/**
* 显示或隐藏label
* @param lid 为undefined时操作的集合为所有
* @param isShow true:显示;false:隐藏
*/
ShowLabels(lids: LabelId[] | undefined, isShow: boolean): void;
/**
* 开关标签隐藏
* @param enable
*/
EnableLabel(enable: boolean): void;
/** 判断ID生成方式 */
generateID(): number;
/**
* 生成label标签
*/
private createdLabel;
/**
* 气球标签
* @param text
* @returns
*/
private createBalloonLabel;
/**
* 扩散效果标签
* @param text
* @returns
*/
private createDiffusionLabel;
/**
* 添加默认标签
* @param pos 定位点
* @param text 文本内容
* @returns 标签Id
*/
AddDefaultLabel(point: THREE.Vector3, text: string, type?: string): LabelId;
/**
* 添加默认标签到构件中心
* @param elementId 构件Id
* @param text 文本内容
* @returns 标签Id
*/
AddDefaultLabelToElement(elementId: string, text: string): LabelId;
/**
* 提取所有的标签
* @returns 所有的标签
*/
ExtractLabels(): Map<LabelId, any>;
/**
* 导出标签
*
* 返回标签数据
* */
ExportLabels(): ITransferredLabelData[];
/**
* 导入标签
* @param labels 标签内容数据,包括点坐标和内容
* @param init 标签样式处理函数
*/
ImportLabels(labels: ITransferredLabelData[], init: (text: string) => string): void;
/**
* 添加闪烁标签
* @param pos 定位点
* @param text 文本内容
* @returns 标签Id
*/
AddSparkleLabel(point: THREE.Vector3, text: string): LabelId;
/**
* 添加闪烁标签到构件中心
* @param elementId 构件Id
* @param text 文本内容
* @returns 标签Id
*/
AddSparkleLabelToElement(elementId: string, text: string): LabelId;
/**
* 添加图标标签
* @param pos 定位点
* @param text 文本内容
* @param iconName 图标类名
* @returns 标签Id
*/
AddIconLabel(point: THREE.Vector3, text: string, iconName?: string): LabelId;
/**
* 添加图标标签到构件中心
* @param elementId 构件Id
* @param text 文本内容
* @returns 标签Id
*/
AddIconLabelToElement(elementId: string, text: string, iconName?: string): LabelId;
/**
* 获取所有标签类型
* @returns
*/
getAllDefaultTypes(): LabelTypes[];
}
export {};
}
declare module 'bimwin-api/api/packages/Light' {
import { Platform } from 'bimwin-api/api/Platform';
/** 光照 */
export class Light {
private _platform;
/** 构造函数 */
constructor(platform: Platform);
/**
* 设置曝光度
* @param turn 默认为0.0正常, [-1, 100]。-1为全暗,100为全亮
*/
SetLightIntensity(turn?: number): void;
}
}
declare module 'bimwin-api/api/packages/Model' {
import { Delegate } from "bimwin-api/bimwin/event";
import * as THREE from 'three';
import { BIMWin2D } from "bimwin-api/bimwin/entry";
import { SelectMode } from 'bimwin-api/bimwin/types';
import { Platform } from "bimwin-api/api/Platform";
import { ModelOptions } from 'bimwin-api/api/types/BWOptions';
export type ModelId = number;
/** 场景清单 */
export class Manifest {
Translation: THREE.Vector3;
Dimension: string;
FileType: string;
Target: THREE.Vector3;
Height: number;
Width: number;
UseCamera: boolean;
}
/** 模型文件所属的Id列表 */
export class ModelNodes {
modelId: ModelId;
fileId: string;
nodeIds: string[];
manifest: Manifest;
}
/** 模型相关的操作 */
export class Model {
private _platform;
/** cad的布局 */
LayoutViewers: BIMWin2D[];
/** 加载的模型集合 */
ModelIdMap: Map<ModelId, ModelNodes>;
modelIdRowMap: Map<ModelId, ModelOptions>;
/** 模型加载数量 */
modelCount: number;
onLayoutLoaded: Delegate<void>;
onStartLoadModel: Delegate<void>;
private modelFileIdMap;
/** 构造函数 */
constructor(platform: Platform);
/** 可用的下一个Id号 */
private _aviModelId;
/** 场景相对于原点的偏移 */
offset: THREE.Vector3 | undefined;
/** 加载的主模型(第一个模型) */
private _mainModelId;
/**
* 下一个可用的模型Id
* @returns
*/
private NextValueModelId;
/** 加载模型 */
LoadModel(Ids: any[] | any, onLoaded?: (fileId: any) => void, onLoading?: (fileId: any) => void): number | void | number[];
/**
* 加载集成模型
*/
LoadCombineModel(combineId: any, onLoaded?: (combineId: any) => void, onLoading?: (combineId: any) => void): void;
/**
* 批量加载模型
*/
LoadBatchModel(fileIds: any, onLoaded?: (fileId: any) => void, onLoading?: (fileId: any) => void): ModelId[] | ModelId;
/**
* 加载模型
* @param fileId
* @param opt
* @param onLoaded
* @param onLoading
*
* 返回模型Id
*/
LoadModelInternalImplementation(mnodes: ModelNodes, fileId: string, opt: ModelOptions, onLoaded?: (fileId: any) => void, onLoading?: (fileId: any) => void): ModelId;
/**
* 移除模型
* @param mId
*/
RemoveModel(mId: ModelId, updateBox?: boolean): void;
/**
* 根据FileId移除模型
* @param fileId
*/
/**
* 提取模型的所有构件Id
* @param mId
* @returns
*/
ExtractElementsInModel(mId: ModelId): any[];
/**
* 加载属性
* @param fileId
* @param host
* @param uri
* @param onload
* @param onfail
*/
LoadProperty(fileId: string, host: string, uri?: string, onload?: (props: any) => void, onfail?: () => void): void;
/**
* 控件显示隐藏
* @param elementId
* @param type
*/
ShowModel(elementId: string, type: boolean): void;
/**
* 控件显示隐藏
* @param elementId
* @param type
*/
ExtractModel(id: string): any;
/**
* 导入gltf模型
*/
LoadGltf(gltfUrl: string, point: THREE.Vector3): any;
/** 当前布局。-1表示当前打开的不是布局 */
private layoutIdx2d;
/** 切换模型空间和布局空间 */
ToggleToLayout2d(id?: number): void;
/** 获取当前布局 */
get CurrentLayoutViewer2d(): BIMWin2D;
/** 返回所有的布局id */
GetLayoutIds2d(): number[];
/** 返回所有的布局名称 */
GetLayoutNames2d(): string[];
/**
* 根据图层名称切换图层
* @param name
* @returns
*/
ChangeLayout2d(name: string): void;
/**
* 切换至模型图层并修改多选框选中
*/
SwitchLayout2d(id?: number): void;
/**
* 切换点选模型样式
* @param type
*/
SwitchSlideSelection(type: boolean): void;
/**
* 切换选择模式
* @param selMode 选择模式,'nochoice', 'singlechoice', 'multiplechoice'
* @returns
*/
SwitchSelectMode(selMode: SelectMode): void;
}
}
declare module 'bimwin-api/api/packages/Property' {
import { Platform } from 'bimwin-api/api/Platform';
import { PropertyKeyValue } from "bimwin-api/api/types/ElementTypes";
/** 构件属性 */
export class Property {
_platform: Platform;
constructor(platform: Platform);
/**
*
* @param filter
* @param single
*/
ExtractIdsByfilter(props: any, filter: (gpName: any, name: any, value: any) => boolean, single?: boolean): string | string[] | undefined;
/**
* 提取构件属性
* @param id
* @returns 返回所有构件属性内容
*/
ExtractProperty(props: any, id: string): any[] | undefined;
/**
* 提取模型组属性
* @param id
* @deprecated The should not be used
*/
ExtractModelGroupProperty(id: string): void;
/**
* 根据( 模型组id/树id )获取包含的构件ids
* @deprecated The should not be used
*/
GetNodesByModelGroupId(id: string): void;
/**
* 根据( 空间id/树id )获取包含的构件ids
* @deprecated The should not be used
*/
GetNodesBySpaceTreeId(id: string): void;
/**
* 提取空间属性
* @param id
* @deprecated The should not be used
*/
ExtractSpaceTreeProperty(id: string): void;
/**
* 查询构件对应的所有属性
* @param id 构件id
* @param filter 过滤函数.(groupName, name, value) => boolean
* @param single true:查到第一条满足条件的;false:查找所有满足条件的
* @returns
*/
ExtractPropertyByFilter(props: any, id: string, filter: (groupName: any, name: any, value: any) => boolean, single?: boolean): PropertyKeyValue | PropertyKeyValue[] | undefined;
}
}
declare module 'bimwin-api/api/packages/Roam' {
import { TwoDimension } from "bimwin-api/bimwin/component/TwoDimension";
import { SelectMode, WalkthroughKeyFrame } from "bimwin-api/bimwin/types";
import * as THREE from "three";
import { Platform } from "bimwin-api/api/Platform";
export class Roam {
platform: Platform;
div: HTMLElement;
isRoaming: boolean;
events: Map<string, any>;
twoDimension: TwoDimension;
selectMode: SelectMode;
/**
* 漫游地图所在DOM
*/
mapDom: HTMLElement;
/**
* 和漫游地图相关的球
*/
mapSphere: THREE.Sphere;
/**
* 用于回收帧渲染事件
*/
private mapLastFrame;
constructor(platfrom: Platform);
isMobile(): RegExpMatchArray;
/**
* 进入漫游模式
* @returns
*/
startRoam(dom: string | HTMLDivElement): void;
private setTopCamera;
/**
* 二维地图映射实际三维位置
*/
private twoD2ThreeD;
/**
* 三维位置映射到二维地图
*/
private threeD2twoD;
private mapClick;
/**
* 摧毁地图
*/
destoryMap(): void;
/**
* 创建顶部视图
*/
createTopView(dom: HTMLElement): void;
/**
* 制定一条直线路径以防止视角偏离
*/
directionalAssistance(): void;
/**
* 关闭漫游模式
* @returns
*/
stopRoam(): void;
/**
* 设置漫游移动速度
* @param speed
*/
setSpeed(speed: number): void;
/**
* 添加漫游路径点
* @return 返回漫游点
*/
addRoamPoint(): WalkthroughKeyFrame;
/**
* 播放漫游动画
* @param arr 传入帧数组
* @param opts 选项,包含播放时间
* @returns
*/
playAnimation(arr: Array<WalkthroughKeyFrame>, speed?: number): Promise<void>;
/**
* 设置漫游是否有重力效果
*/
setGravityEffect(bool: boolean): void;
/**
* 设置漫游是否有碰撞效果
*/
setCollisionEffect(bool: boolean): void;
/**
* 设置开启第三人称漫游
*/
setThirdPerson(): void;
setFirstPerson(): void;
/**
* 重置视角位置
*/
resetVisualAnglePosition(x?: number | THREE.Vector3, y?: number, z?: number): void;
}
}
declare module 'bimwin-api/api/packages/Service' {
import { ISecret } from 'bimwin-api/api/types/BWOptions';
import { Platform } from 'bimwin-api/api/Platform';
export type ServiceAgent = {
fileInfo?: {
url: string;
intercept?: (obj: any) => any;
};
fileList?: {
url: string;
intercept?: (obj: any) => any;
};
combineListUri: {
url: string;
};
apiVersion?: number;
};
/** 服务 */
export class Service {
/** 网络地址 */
host: string;
agent: ServiceAgent;
auth: ISecret;
platform: Platform;
/** 构造函数 */
constructor(_platform: Platform, host: string, auth?: ISecret, agent?: ServiceAgent);
/**
* 设置授权cookie
* @param auth
*/
private SetAuthCookies;
/**
* fetch
* @param uri
* @param opt
* @param onsuccess
* @param onfail
*/
fetch(uri: string, opt: object, onsuccess: any, onfail: any): void;
/**
* 获得授权头
* @returns
*/
private GetAuthHeaders;
/**
* 获得文件信息
* @param uri
* @param onsucc
* @param onfail
*/
GetFileInfo(fileId: string, onsucc?: any, onfail?: any): void;
/**
* 获得文件类型
* @param fileId
*/
GetFileBimType(fileId: string, callback: any): void;
/**
* 获取文件列表
* @param fileId
* @param onsucc
* @param onfail
*/
GetFileList(fileId: string, onsucc?: any, onfail?: any): void;
/**
* 获取集成文件列表
* @param combineId
* @param onsucc
* @param onfail
*/
GetCombineFileList(combineId: string, onsucc?: any, onfail?: any): void;
/**
*
* @param uri
* @param onsucc
* @param onfail
*/
Get(uri: string, onsucc?: any, onfail?: any): void;
GetFile(uri: string, onsucc?: any, onfail?: any): void;
}
}
declare module 'bimwin-api/api/packages/ToolKit' {
/*********************
** 文件说明 各种小的工具
** 创建时间 20211118
** 创建人 樊永炼
**********************/
import { RectSelection } from "bimwin-api/bimwin/component/rectSelection";
import { _FileCache } from 'bimwin-api/bimwin/tool/FileCache';
import { Platform } from 'bimwin-api/api/Platform';
/** 小的工具集 */
export class ToolKit {
_platform: Platform;
RectSelection: RectSelection;
_fileCache: _FileCache;
/**
* 构造函数
* @param platform
*/
constructor(platform: Platform);
/**
* 初始化
*/
Init(): void;
}
}
declare module 'bimwin-api/api/packages/Util' {
import * as THREE from "three";
import { Platform } from 'bimwin-api/api/Platform';
/** 通用方法 */
export class Util {
_platform: Platform;
constructor(platform: Platform);
/**
* 画线
* @param st 起点
* @param ed 终点
* @param clr 颜色
*/
DrawLine(st: THREE.Vector3, ed: THREE.Vector3, clr: THREE.Color): void;
}
}
declare module 'bimwin-api/api/Platform' {
import * as THREE from "three";
import { BIMWin2D, BIMWin3D } from "bimwin-api/bimwin/entry";
import { Annotation } from 'bimwin-api/api/packages/Annotation';
import { BwEvent } from 'bimwin-api/api/packages/BwEvent';
import { Camera } from 'bimwin-api/api/packages/Camera';
import { Element } from 'bimwin-api/api/packages/Element';
import { Information } from "bimwin-api/api/packages/Infomation";
import { Label } from 'bimwin-api/api/packages/Label';
import { Light } from 'bimwin-api/api/packages/Light';
import { Model } from 'bimwin-api/api/packages/Model';
import { Property } from 'bimwin-api/api/packages/Property';
import { Roam } from "bimwin-api/api/packages/Roam";
import { Service } from 'bimwin-api/api/packages/Service';
import { ToolKit } from 'bimwin-api/api/packages/ToolKit';
import { Util } from 'bimwin-api/api/packages/Util';
import { BWOptions, Theme } from 'bimwin-api/api/types/BWOptions';
import { Effect } from "bimwin-api/api/packages/Effect";
/** bimwin平台 */
export class Platform {
/** 版本 */
Version: string;
/** 服务接口 */
Service: Service;
/** 模型 */
Model: Model;
/** 构件 */
Element: Element;
/** 标签 */
Label: Label;
/** Annotation */
Annotation: Annotation;
/** Camera */
Camera: Camera;
/** 常用事件 */
BwEvent: BwEvent;
/** 光照 */
Light: Light;
/** 漫游 */
Roam: Roam;
/** 基本信息 */
Information: Information;
/** 实用工具 */
Util: Util;
/** 属性 */
Property: Property;
/** 小的工具集 */
ToolKit: ToolKit;
/** 测试示例 */
/** bimwin对象 */
private _bimwin;
Effect: Effect;
get bimwin(): BIMWin2D | BIMWin3D;
/** bimwin对象名字 */
bimwinName: string;
/** 初始化选项 */
options: BWOptions;
/** 构造函数 */
constructor(options: BWOptions);
bridgingOptions(options: BWOptions): void;
HandleThemeColor(theme: Theme): void;
/**
* 初始化必要事件监听
*/
addEvenList(): void;
/**
* 打开debugUI
*/
openDebugUI(): void;
/**
* 初始化
*/
Init(): Platform;
/**
* 销毁整个webgl
*/
dispose(): Promise<unknown>;
/**
* 执行动作
*/
private actions;
/**
* bimwin初始化后
*/
OnReady(): void;
/**
* bimwin对象准备好了再执行
* @param action
* @returns
*/
Ready(action: () => void): Platform;
/**
* 初始化bimwin对象
* @param dom
* @param type
*/
private InitBimWin;
/**
* 生成bimwin实例的惟一名字,在多个实例存在时用来区分对象
* @returns
*/
private GetBimwinName;
/**
* 设置背景颜色
* @param clr 颜色。"#ff00ff"
*/
SetBackgroundColor(clr: string): void;
/**
* 适配向量。当前向量空间为y向上,z指向屏幕外面。当前场景标准单位为米
* @param x x坐标
* @param y y坐标
* @param z z坐标
* @param unit 单位。默认为1。1代表米;0.001代表毫米;1000代表千米
* @returns
*/
AdaptVector3(x: number, y: number, z: number, unit?: number): THREE.Vector3;
}
}
declare module 'bimwin-api/api/types/BwEventTypes' {
import * as THREE from 'three';
/**
* 构件被选择时返回的参数
*/
export interface SelectedArg {
hit: boolean;
id?: string | string[];
v2?: THREE.Vector2;
v3?: THREE.Vector3;
multi?: string[];
}
/**
* 框选构件集合
*/
export interface RectSelectedArg {
pt0: THREE.Vector2;
pt1: THREE.Vector2;
ids: string[];
}
}
declare module 'bimwin-api/api/types/BWOptions' {
import * as THREE from 'three';
import { ViewDirection } from "bimwin-api/bimwin/entry";
import { ServiceAgent } from 'bimwin-api/api/packages/Service';
/** token */
export interface ISecret {
[key: string]: string;
}
export type BimType = "3D" | "2D";
export interface Theme {
primaryColor?: string;
headerColor?: string;
borderColor?: string;
fontColor?: string;
}
/** 环境选项 */
export interface BWOptions {
el: string | HTMLDivElement;
url: string;
modelUrl?: string;
online?: boolean;
secret?: ISecret;
unit?: string;
isShowAnimationClose?: Boolean;
isShowDebugUI: boolean;
isShowTree: boolean;
isShowToolbar: Boolean;
isShowMenu: Boolean;
isShowAnimation?: boolean;
type?: BimType;
loadLineMesh: boolean;
background?: string;
isShowToolbarButton: boolean;
isShowTip?: boolean;
isShowSlideSelection?: boolean;
isShowLayout?: boolean;
theme?: Theme;
isVue?: boolean;
isFileCache?: boolean;
loadingStyle?: string;
isHover?: boolean;
agent?: ServiceAgent;
rotateAround?: "near" | "center";
apiVersion?: number;
isCombine?: boolean;
showTitle?: boolean;
}
/** UI选项 */
export interface UIOptions {
url?: string;
type?: string;
unit?: string;
isShowAnimationClose: Boolean;
isShowMenu: Boolean;
isShowToolbar: Boolean;
isShowDebugUI: Boolean;
isShowTree: Boolean;
isShowAnimation?: boolean;
isShowToolbarButton: boolean;
createName?: string;
isShowTip?: boolean;
isShowSlideSelection?: boolean;
isShowLayout?: boolean;
background?: string;
loadingStyle?: string;
isHover?: boolean;
}
/** 模型文件选项 */
export interface ModelOptions {
sceneMatrix?: THREE.Matrix4;
fitView: boolean;
viewDirection: ViewDirection;
viewLayout2d?: boolean;
nodeIdPrefix?: string;
id?: string;
}
}
declare module 'bimwin-api/api/types/ElementTypes' {
export interface PropertyKeyValue {
GroupName: string;
Name: string;
Value: string;
}
}
declare module 'bimwin-api/api/types/LabelTypes' {
/**
* 传输的标签数据
*/
export interface ITransferredLabelData {
text: string;
x: number;
y: number;
z: number;
}
}
declare module 'bimwin-api/bimwin/bimwin2d' {
import * as THREE from 'three';
import { EditorControls2D } from 'bimwin-api/bimwin/camera/editorControls2D';
import { HoverNode } from 'bimwin-api/bimwin/component/hoverNode';
import { BoundingBox } from 'bimwin-api/bimwin/core/boundingBox';
import { Intersection } from 'bimwin-api/bimwin/core/intersect';
import { Node } from 'bimwin-api/bimwin/core/staticMeshBlock';
import { StaticScene2D } from "bimwin-api/bimwin/core/staticScene2d";
import { Delegate } from "bimwin-api/bimwin/event";
import { Octree } from 'bimwin-api/bimwin/tool/Octree/Octree';
import { CameraData, IColor, Layout, LayoutViewPort, SceneLoadOption2D, SceneLoadProgress, SelectMode } from 'bimwin-api/bimwin/types';
/**
* BIMWin二维图形引擎
*/
export class BIMWin2D {
cursor: any;
hostDiv: HTMLDivElement;
canvas: HTMLCanvasElement;
/**THREE场景 */
scene: THREE.Scene;
/**相机 */
camera: THREE.OrthographicCamera;
cameraControls: EditorControls2D;
/** 插件集合 */
plugins: any;
/**THREEWebGLRenderer */
renderer: THREE.WebGLRenderer;
treshold: number;
selectMode: SelectMode;
staticScene: StaticScene2D;
highlightSet: Set<string>;
private hideSet;
isMeasure: boolean;
private mainDiv;
private handles;
/**悬浮显示节点 */
hoveNode: HoverNode;
/**高亮节点 */
higlightNode: HoverNode;
onPickPoint: Delegate<Intersection>;
/**
* 滚轮滚动事件
*/
onWheel: Delegate<WheelEvent>;
/**
* 鼠标移动事件
*/
onMouseMove: Delegate<MouseEvent>;
/**
* 鼠标按下事件
*/
onMouseDown: Delegate<MouseEvent>;
/**
* 鼠标抬起事件
*/
onMouseUp: Delegate<MouseEvent>;
/**
* 鼠标点击事件
*/
onMouseClick: Delegate<MouseEvent>;
/**
* 键盘按键按下事件
*/
onKeyDown: Delegate<KeyboardEvent>;
/**
* 键盘按键抬起事件
*/
onKeyUp: Delegate<KeyboardEvent>;
/**
* 聚焦事件
*/
onFocus: Delegate<FocusEvent>;
/**
* 脱焦事件
*/
onBlur: Delegate<FocusEvent>;
/**
* 触摸开始事件
*/
onTouchStart: Delegate<TouchEvent>;
/**
* 拖动事件
*/
onTouchMove: Delegate<TouchEvent>;
/**
* 拖动中断事件
*/
onTouchCancel: Delegate<TouchEvent>;
/**
* 触摸结束事件
*/
onTouchEnd: Delegate<TouchEvent>;
/**
* 当即将执行渲染时事件 传入的参数为上一帧的间隔
*/
onRender: Delegate<number>;
/**
* 执行渲染后时事件
*/
onRenderAfter: Delegate<void>;
/**
* 浏览器缩放事件
*/
onResize: Delegate<number>;
/**
* 场景加载完毕事件
*/
onSceneLoaded: Delegate<string>;
/**
* 模型加载完成事件 如果多个模型同时加载会在全部加载完后触发
*/
onModelLoaded: Delegate<void>;
/**
* 场景加载进度事件
*/
onSceneLoadProgress: Delegate<SceneLoadProgress>;
/**
* 当画板大小变动时
*/
onCanvasSizeChanged: Delegate<THREE.Vector2>;
/**
* 布局
*/
Layout?: Layout;
Visible: boolean;
/**
* 结点八叉树
*/
octree: Octree;
onAppendLayoutMenu: Delegate<any[]>;
onSelectModel: Delegate<string>;
/**
* 实例化BIMWin3D引擎
* @param hostDiv
*/
constructor(hostDiv: HTMLDivElement | string, visible?: boolean);
dispose(): Promise<unknown>;
/**
* 生成八叉树
*/
private GenerateOctree;
/**
* 通过Url地址加载模型
* @param root 模型根目录
* @param fileName 模型索引文件名
*/
loadBWSceneFormUrl(root: string, fileName: string, option?: SceneLoadOption2D): Promise<void>;
/**
* 通过鼠标坐标获取场景射线
* @param offsetX 鼠标偏移X轴
* @param offsetY 鼠标偏移Y轴
* @returns 射线实例
*/
getRaycaster(offsetX: number, offsetY: number): THREE.Raycaster;
/**
* 执行射线与模型的相交计算
* @param raycaster 射线
* @returns 射线与模型相交计算返回结果
*/
intersectsLineMesh(raycaster: THREE.Raycaster): Intersection;
/**
* 设置鼠标点选模式
* @param selectMode 点选模式
*/
setSelectMode(selectMode: SelectMode): void;
/**
* 重新计算外包围盒(一般用不到)
* @param updateMeshBoundingBox 是否重新计算Mesh的点集数据
*/
updateBoundBox(updateMeshBoundingBox: boolean): void;
/**
* 重置视口位置到模型中心
*/
resetViewport(): void;
/** 移动视口到指定位置
* @param centreX 视口中心点X坐标
* @param centreY 视口中心点Y坐标
* @param width 视口宽度
* @param height 视口高度
*/
moveViewport(centreX?: number, centreY?: number, width?: number, height?: number): void;
/**
* 获取当前相机下的场景比例尺
* @returns 每像素在场景内的长度
*/
getSceneScale(): number;
/**
* 获取场景内加载的所有节点实例
* @returns 节点列表
*/
getNodes(): Node[];
/**
* 将指定的节点列表移除出场景
* @param ids 节点Id
* @param updateBoundBox 是否重新计算外包围盒
*/
removeNodes(ids: string[], updateBoundBox?: boolean): void;
/**
* 将指定的节点应用矩阵位置转换
* @param ids
* @param matrix
* @returns
*/
nodesApplyMatrix(ids: string[], matrix: THREE.Matrix4): void;
/**
* 移除所有的构件 清空场景
*/
clearScene(): void;
/**
* 二维点转三维点
* @param x 轴位置
* @param y 轴位置
* @returns
*/
project(x: number, y: number, ndcZ?: number): THREE.Vector3;
/**
* 获取节点列表的外包围盒
* @param ids 节点Id
* @returns 包围盒实例
*/
getNodesBoundingBox(ids: string[]): BoundingBox;
/**
* 获取场景的外包围盒
* @returns 包围盒实例
*/
getSceneBoundingBox(): BoundingBox;
/**
* 设置相机控制器是否启用
* @param isEnable 是否启用
*/
setCameraControlsIsEnable(isEnable: boolean): void;
/**
* 获取当前的相机信息
*/
getCameraData(): CameraData;
/**
* 将当前的相机状态设置到场景
* @param cameraData 相机状态
*/
setCameraData(cameraData: CameraData): void;
/**
* 获取高亮材质
*/
getHighlightMaterial(): THREE.Material;
/**
* 获取着色材质
*/
getColorMaterial(): THREE.Material;
/**
* 获取线框高亮材质
*/
getLineHighlightMaterial(): THREE.Material;
/**
* 获取线框着色材质
*/
getLineColorMaterial(): THREE.Material;
/**
* 设置高亮材质
*/
setHighlightMaterial(highlightMaterial: THREE.Material): void;
/**
* 设置着色材质
*/
setColorMaterial(colorMaterial: THREE.Material): void;
/**
* 设置线框高亮材质
*/
setLineHighlightMaterial(lineHighlightMaterial: THREE.Material): void;
/**
* 设置线框着色材质
*/
setLineColorMaterial(lineColorMaterial: THREE.Material): void;
/**
* 获取高亮列表 [!只读!]
*/
getNodeHighlightSet(): ReadonlySet<string>;
/**
* 获取高亮列表 [!只读!]
*/
getNodeHighlightList(): Array<string>;
/**
* 获取隐藏列表 [!只读!]
*/
getNodeHideSet(): ReadonlySet<string>;
/**
* 取消所有构件的高亮
*/
clearAllNodesHighlight(): void;
/**
* 取消所有构件的隐藏
*/
clearAllNodesHide(): void;
/**
* 设置指定节点列表高亮
* @param ids 节点列表
* @param isHighlight 是否高亮
*/
setNodesHighlight(ids: string[], isHighlight: boolean): void;
/**
* 切换指定节点列表的高亮
* @param ids 节点列表
*/
switchNodesHighlight(ids: string[]): void;
/**
* 设置指定节点列表显隐
* @param ids 节点列表
* @param isVisible 是否显示
*/
setNodesVisible(ids: string[], isVisible: boolean): void;
/**
* 设置指定节点列表的状态值
* @param ids 节点列表
* @param state 状态值 [隐藏:-1] [高亮:0] [材质:1] [半透明:2] [着色:3]
*/
setNodesState(ids: string[], state: number): void;
/**
* 设置所有节点列表的状态值
* @param ids 节点列表
* @param state 状态值 [隐藏:-1] [材质:0] [高亮:1] [着色:2]
*/
setAllNodesState(state: number): void;
/**
* 设置指定节点列表的白模线框颜色(需要配合节点状态值是3)
* @param ids 节点列表
* @param hexColor 颜色 例: '#DDFF77'
*/
setNodesClayColor(ids: string[], hexColor: string): void;
/**
* 设置所有节点列表的白模颜色(需要配合节点状态值是3)
* @param hexColor 颜色 例: '#DDFF77'
*/
setAllNodesClayColor(hexColor: string): void;
/**
* 设置指定节点列表的白模线框颜色(需要配合节点状态值是3)
* @param ids 节点列表
* @param hexColor 颜色 例: '#DDFF77'
*/
setNodesLineClayColor(ids: string[], hexColor: string): void;
/**
* 设置所有节点列表的白模线框颜色(需要配合节点状态值是3)
* @param hexColor 颜色 例: '#DDFF77'
*/
setAllNodesLineClayColor(hexColor: string): void;
/**
* 设置悬浮节点
* @param id 悬浮节点的Id
*/
setHoverNode(id: string): void;
/**
* 打开悬浮显示
*/
showHover(): void;
/**
* 关闭悬浮显示
*/
hideHover(): void;
/**
* 设置悬浮颜色
* @param color 颜色
*/
setHoverColor(color: IColor): void;
/**
* 获取canvas
* @returns
*/
getCanvas(): HTMLCanvasElement;
/**
* 设置场景背景颜色
* @param color 颜色
*/
setSceneBackgroundColor(color: string): void;
/**
* 异步点选模型上的一个点,并返回点选信息
* 如果返回null则代表取消了点选
*/
pickPoint(): Promise<Intersection>;
/**
* 取消当前的点选等待直接返回
*/
cancelPickPoint(): void;
/**
* 将三维模型内的点投影到HtmlCanvas坐标
* @param point 要投影的三维场景坐标
* @returns HtmlCanvas坐标
*/
unprojectPoint(point: THREE.Vector3): THREE.Vector3;
/**
* 执行测量 (在执行过程中可以点击鼠标右键终止测量)
*/
startMeasure(cd?: any): void;
/**
* 终止测量
*/
stopMeasure(): void;
SetVisible(visible?: boolean): void;
RenderViewport(vp: LayoutViewPort): void;
RenderWithLayout(): void;
OnViewChanged(): void;
RegisterViewportChanged(): void;
/**
* 与射线相交的信息
* @param ray
* @param radiusForLine
* @returns
*/
IntersectWithRay(ray: THREE.Ray, radiusForLine?: number): Intersection;
/**绘制视口 */
DrawViewportTest(vp: LayoutViewPort): void;
DrawLineTest(p0: THREE.Vector3, p1: THREE.Vector3, color: number): void;
DrawLineTestArray(p0: number[], p1: number[], color: number): void;
/**
* 构件集