49 lines
1.3 KiB
TypeScript
49 lines
1.3 KiB
TypeScript
![]() |
import * as THREE from 'three';
|
||
|
import { CameraControls } from '../Editor/CameraControls';
|
||
|
import { Viewer } from '../GraphicsSystem/Viewer';
|
||
|
interface LoadFileRes {
|
||
|
State: boolean;
|
||
|
Obj?: Object;
|
||
|
}
|
||
|
/**
|
||
|
* 只允许拥有一个view的实例. 暂时不支持多个view在一个页面.
|
||
|
*/
|
||
|
export declare class WebCADView {
|
||
|
m_EdgeEntitytList: Array<THREE.LineSegments>;
|
||
|
m_SolidEntityList: Array<THREE.Object3D>;
|
||
|
m_Viewer: Viewer;
|
||
|
m_CamerCtrl: CameraControls;
|
||
|
/**
|
||
|
* Creates an instance of WebCADView.
|
||
|
*
|
||
|
* 构造函数,提供一个dom节点..
|
||
|
*
|
||
|
* @param {HTMLElement} domNode
|
||
|
* @memberof WebCADView
|
||
|
*/
|
||
|
constructor(domNode: HTMLElement);
|
||
|
WriteEdge(obj: THREE.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
|