ng-cw-v12
Version:
Angular UI Component Library
99 lines (98 loc) • 3.5 kB
TypeScript
import { ElementRef, OnDestroy, AfterViewInit, SimpleChanges, OnChanges, NgZone } from '@angular/core';
import { LocalService } from './local.service';
import * as i0 from "@angular/core";
export declare type NcCameraPlacementType = 'default' | 'left' | 'right' | 'top' | 'bottom' | 'back' | 'front';
export interface NcObjInfo {
objUrl: string;
mtlUrl: string;
}
export declare class ObjViewerComponent implements AfterViewInit, OnDestroy, OnChanges {
private eleRef;
private ls;
private ngZone;
/** 模型地址 */
ncObjInfo: NcObjInfo;
/** 摄像机初始方位 */
ncCameraPlacement: NcCameraPlacementType;
/** 是否启用背景 */
set ncBg(value: boolean | string);
/** 背景色值 */
set ncBgColor(value: string);
/** 背景图片URL */
private _bgUrl;
set ncBgUrl(value: string);
get ncBgUrl(): string;
/** 操作提示 */
private _tips;
set ncTips(value: boolean | string);
get ncTips(): boolean;
/** 控制面板 */
private _control;
set ncControl(value: boolean | string);
get ncControl(): boolean;
/** 背景是否透明 */
private _alpha;
set ncAlpha(value: boolean | string);
get ncAlpha(): boolean;
/** 自动旋转 */
set ncAutoRotate(value: boolean | string);
/** 自动旋转速度 */
set ncAutoRotateSpeed(value: number);
showLoading: boolean;
loadingText: string;
loadingText2: string;
domId: string;
camera: any;
cameraPlacement: string;
backgroundSphere: any;
scene: any;
renderer: any;
domWidth: any;
domHeight: any;
objScene: any;
size: number;
center: any;
controls: any;
gui: any;
state: any;
constructor(eleRef: ElementRef, ls: LocalService, ngZone: NgZone);
ngOnChanges(changes: SimpleChanges): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
init(): void;
render(): void;
animate(): void;
onWindowResize(): void;
updateModel(): void;
setCameraPlacement(): void;
addGUI(): void;
updateToneMapping(): void;
updateToneMappingExposure(): void;
updateBackground(): void;
axesHelper: any;
toggleAxesHelper(): void;
toggleWireframe(): void;
traverseMaterials(object: any, callback: any): void;
toggleAutoRotate(): void;
ambientLight: any;
toggleAmbientLight(): void;
updateAmbientLight(): void;
directionalLight: any;
toggleDirectionalLight(): void;
updateDirectionalLight(): void;
directionalLightHelper: any;
toggleDirectionalLightHelper(): void;
directionalLight2: any;
toggleDirectionalLight2(): void;
updateDirectionalLight2(): void;
directionalLightHelper2: any;
toggleDirectionalLightHelper2(): void;
pointLight: any;
togglePointLight(): void;
updatePointLight(): void;
pointLightHelper: any;
togglePointLightHelper(): void;
webglLoseContext(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<ObjViewerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<ObjViewerComponent, "nc-obj-viewer", never, { "ncObjInfo": "ncObjInfo"; "ncCameraPlacement": "ncCameraPlacement"; "ncBg": "ncBg"; "ncBgColor": "ncBgColor"; "ncBgUrl": "ncBgUrl"; "ncTips": "ncTips"; "ncControl": "ncControl"; "ncAlpha": "ncAlpha"; "ncAutoRotate": "ncAutoRotate"; "ncAutoRotateSpeed": "ncAutoRotateSpeed"; }, {}, never, never>;
}