ng-cw-v12
Version:
Angular UI Component Library
83 lines (82 loc) • 2.91 kB
TypeScript
import { ElementRef, OnDestroy, AfterViewInit, SimpleChanges, OnChanges, NgZone } from '@angular/core';
import * as THREE from 'three';
import { LocalService } from './local.service';
import * as i0 from "@angular/core";
export declare type NcCameraPlacementType = 'default' | 'left' | 'right' | 'top' | 'bottom' | 'back' | 'front';
export declare class GltfViewerComponent implements AfterViewInit, OnDestroy, OnChanges {
private eleRef;
private ls;
private ngZone;
/** 模型地址 */
ncUrl: string;
/** 摄像机初始方位 */
ncCameraPlacement: NcCameraPlacementType;
/** 是否启用背景色 */
set ncBg(value: boolean | string);
/** 背景色值 */
set ncBgColor(value: 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;
showLoading: boolean;
domId: string;
camera: any;
scene: any;
loader: any;
renderer: any;
domWidth: any;
domHeight: any;
gltf: any;
size: number;
center: any;
controls: any;
mixer: THREE.AnimationMixer | null;
clock: THREE.Clock;
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;
updateAnimation(): void;
ambientLight: any;
toggleAmbientLight(): void;
updateAmbientLight(): void;
directionalLight: any;
toggleDirectionalLight(): void;
updateDirectionalLight(): void;
directionalLightHelper: any;
toggleDirectionalLightHelper(): void;
pointLight: any;
togglePointLight(): void;
updatePointLight(): void;
pointLightHelper: any;
togglePointLightHelper(): void;
webglLoseContext(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GltfViewerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GltfViewerComponent, "nc-gltf-viewer", never, { "ncUrl": "ncUrl"; "ncCameraPlacement": "ncCameraPlacement"; "ncBg": "ncBg"; "ncBgColor": "ncBgColor"; "ncTips": "ncTips"; "ncControl": "ncControl"; "ncAlpha": "ncAlpha"; }, {}, never, never>;
}