webcad-ue4-api/types/WebCADView/WebCADView.d.ts
2022-05-30 11:05:47 +08:00

49 lines
1.3 KiB
TypeScript

import { LineSegments, Object3D } from 'three';
import { CameraControls } from '../Editor/CameraControls';
import { Viewer } from '../GraphicsSystem/Viewer';
interface LoadFileRes {
State: boolean;
Obj?: Object;
}
/**
* 只允许拥有一个view的实例. 暂时不支持多个view在一个页面.
*/
export declare class WebCADView {
_EdgeEntitytList: Array<LineSegments>;
_SolidEntityList: Array<Object3D>;
_Viewer: Viewer;
_CamerCtrl: CameraControls;
/**
* Creates an instance of WebCADView.
*
* 构造函数,提供一个dom节点..
*
* @param {HTMLElement} domNode
* @memberof WebCADView
*/
constructor(domNode: HTMLElement);
WriteEdge(obj: Object3D, color?: number): void;
/**
*
* 加载场景
*
* @param {string} jsonFile
* @memberof WebCADView
*/
Load(jsonFile: string, pathUrl: string): Promise<void>;
/**
* 加载json
*
* @param {string} jsonFile
* @returns {Promise<LoadFileRes>}
* @memberof WebCADView
*/
LoadJson(jsonFile: string): Promise<LoadFileRes>;
ZoomAll(): void;
ViewToFont(): void;
ViewToTop(): void;
SolidShow(): void;
EdgeShow(): void;
}
export {};
//# sourceMappingURL=WebCADView.d.ts.map