import { WebGPURenderer } from 'three/webgpu'; import { DIVEScene } from '../scene/Scene.ts'; /** * @deprecated Use `scene.setImageBasedLight` and `scene.setBackground`. */ export type DIVEEnvironmentSettings = { /** * Whether to enable the image-based lighting. * * @default true * @deprecated Use `scene.setImageBasedLight(null)` to turn it off. */ enabled: boolean; /** * The URL of the HDR image. * * @default defaultEnvUrl from assets/maps/env/default.hdr * @deprecated Use `scene.setImageBasedLight({ image })`. */ imageUrl: string; /** * Whether to use the HDR image as a background image. * * @default false * @deprecated Use `scene.setBackground({ image, rotation })`. */ useAsBackground: boolean; /** * The rotation of the HDR image in radians. * * @default 0 * @deprecated Use `scene.setImageBasedLight({ rotation })`. */ rotateY: number; }; /** * @deprecated Use `DIVEImageBasedLightDefaultSettings`. */ export declare const DIVEEnvironmentDefaultSettings: DIVEEnvironmentSettings; /** * The old way to set the image based light and to show its image as the * background. Only forwards to the scene, which the renderer bakes from. * * @deprecated Use `scene.setImageBasedLight` and `scene.setBackground`. */ export declare class DIVEEnvironment { private _scene; private _useAsBackground; /** the background to go back to once the image is no longer shown */ private _backgroundBefore; /** the newest image request made here */ private _imageLoad; /** * @param _renderer - Unused; the renderer bakes from the scene itself. * @param scene - The scene to forward to. * @param options - Applied to the scene; what is left out stays as the * scene has it. */ constructor(_renderer: WebGPURenderer, scene: DIVEScene, options?: Partial); /** * Resolves once the image requested here has loaded. * * @deprecated The renderer applies the scene's image based light itself. */ initAsync(): Promise; /** * Does nothing, the scene owns everything forwarded to it. * * @deprecated The renderer frees what it baked itself. */ dispose(): void; /** * Does nothing, the renderer applies changes on its next frame. * * @deprecated The renderer applies the scene's image based light itself. */ update(): void; /** * Does nothing, the renderer rebakes on a new canvas itself. * * @deprecated The renderer rebakes on a new canvas itself. */ setRenderer(_renderer: WebGPURenderer): void; /** * Sets the image of the image based light, and of the background while * the image is used as one. * * @param url - The URL of the image, `null` for the default HDR. * @deprecated Use `scene.setImageBasedLight({ image })`. */ setImageUrl(url: string | null): Promise; /** * Rotates the image based light, and the background if it is an image. * * @param radians - The rotation around Y. * @deprecated Use `scene.setImageBasedLight({ rotation })` and * `scene.setBackground({ image, rotation })`. */ setRotationY(radians: number): void; /** * Shows the image of the image based light as the background, or goes * back to the background from before. * * @param useAsBackground - Whether to show the image. * @deprecated Use `scene.setBackground({ image, rotation })`. */ setUseAsBackground(useAsBackground: boolean): void; /** puts the light's image on the background, which shares its load */ private _showImage; /** logs a failure nobody awaits and settles either way */ private _reportFailure; }