/** * 关于Atom:慧睦开发者平台技术框架(基于cesium) * 本来想起叫『尘埃造物』来着,后来想想这要是翻译成英文,那得多长,那叫尘埃怎么样,英文翻译是dust, * 又感觉这名字有点土,那原子呢,atom!!!不错啊,像奥特曼的谐音吧,反正我是相信光的。 * 今天是2022.04.01,愚人节,也不知道是不是上天跟我开了一个玩笑,在此之前,这版平台的开发已经接近尾声了, * cesium是不带scene graph的,这在处理bim模型楼层分层的时候,对于子场景项的处理非常吃力,我躺床上躺了一下午都没有灵感, * 索性加上,而且,scene graph应当是地基级别的功能。 */ import { Viewer, PrimitiveCollection } from 'cesium'; import { AOblique } from './scene/sceneItems/aOblique'; import { ALabel } from './scene/sceneItems/aLabel'; import { AGLTF } from './scene/sceneItems/aGLTF'; import { ABuilding } from './scene/sceneItems/aBuilding'; import { APolyline } from './scene/sceneItems/aPolyline'; import { AClassification } from './scene/sceneItems/aClassification'; import { AArea } from './scene/sceneItems/aArea'; import { Anchor } from './scene/sceneItems/aAnchor'; import { AIcon } from './scene/sceneItems/aIcon'; import { ABlock } from './scene/sceneItems/aBlock'; import { SceneGraph, Flatten } from './scene/SceneGraph'; import { SceneItem } from './scene/SceneItem'; import 'cesium/Source/Widgets/widgets.css'; interface config { accessToken: string; modelUrl: string; interfaceUrl: string; appKey: string; } declare class Atom { sceneGraph: SceneGraph; viewer: Viewer; treeRootNodeCollection: PrimitiveCollection; private _MODEL_URL; private _INTERFACE_URL; private _APP_KEY; constructor(selectorID: string, config: config, options?: any); /** * @param config 模型资源地址、接口地址、token、key信息 */ private configNetwork; /** * @description 发起网络请求之前检查必要信息 */ private beforeFetchCheck; /** * @description 响应拦截 * @param res 响应数据 */ private responseCheck; /** * @description (http request)获取场景树 * @param sceneId 场景id */ getSceneTreeInformation(sceneId: number): Promise; /** * @description 初始化场景图 * @param options 初始化场景图参数 * */ generateSceneGraph(sceneTree: any, options?: any): void; /** * @description 根据自定义属性查找场景项信息 * @param sceneId 场景id * @param code 自定义属性键名 * @param value 自定义属性值 * @returns Object */ getSceneItemInformationByParam(sceneId: number, code: string, value: string): Promise; /** * @description 根据自定义属性code查找场景项信息 * @param sceneId 场景id * @param code 自定义属性键名 * @returns */ getSceneItemInformationByCode(sceneId: number, code: string): Promise; /** * @description 定位到指定场景项 * @param sceneItemInfomation 单个场景项的场景信息 * @returns */ targeting(sceneItemInfomation: any): void; hideGlobe(): void; showGlobe(): void; /** * 销毁 */ destroy(): void; } export { Atom, AOblique, ALabel, AGLTF, ABuilding, APolyline, AClassification, AArea, Anchor, AIcon, SceneItem, SceneGraph, Flatten, ABlock };