import { THREE, BaseViewer, Plugin, PluginConfig } from "@x-viewer/core"; import { GradientColorSkybox } from "./GradientColorSkybox"; /** * Skybox plugin config. */ export interface SkyboxPluginConfig extends Partial { /** * Initial single color of the skybox. * If specified, it initialize with a single color background. Otherwise, * the skybox initialize with default gradient colors. */ color?: number[]; } /** * Skybox plugin. It is mainly used by Viewer3d, while can also be used by Viewer2d. * You can set skybox in several means: * 1) Single color, by using setSkyboxByColor(). * 2) Gradient colors, by using setSkyboxByGradientColors(). * 3) Cube texture, by using setSkyboxByCubeTexture(). */ export declare class SkyboxPlugin extends Plugin { static readonly DEFAULT_ID = "SkyboxPlugin"; protected gradientColorSkybox?: GradientColorSkybox; protected enabled: boolean; constructor(viewer: BaseViewer, cfg?: SkyboxPluginConfig); setEnabled(enable: boolean): void; isEnabled(): boolean; /** * Set skybox by a single color. * @param color rgb number array, each value is between 0 and 1. e.g. [0.92, 0.95, 0.96] */ setSkyboxByColor(color?: number[]): void; /** * Sets skybox by 3 gradient colors (top, skyline, bottom). */ setSkyboxByGradientColors(topColor?: number[], // 0x86b6f5 skylineColor?: number[], // 0xffffff bottomColor?: number[]): void; /** * Sets skybox by cube texture (6 images). */ setSkyboxByCubeTexture(urls: string[]): void; destroy(): void; /** * Converts rgb color number array to THREE.Color. */ protected rgb2Color(color: number[]): THREE.Color; }