import Texture, { TextureOpts, TextureSource } from './Texture'; export declare const cubeTargets: readonly ["px", "nx", "py", "ny", "pz", "nz"]; export type CubeTarget = 'px' | 'nx' | 'py' | 'ny' | 'pz' | 'nz'; export type TextureCubeSource = Record; export interface TextureCubeOpts extends TextureOpts { mipmaps?: TextureCubeSource[]; } /** * @constructor clay.TextureCube * @extends clay.Texture * * @example * ... * const mat = new clay.Material({ * shader: clay.shader.library.get('clay.phong', 'environmentMap') * }); * const envMap = new clay.TextureCube(); * envMap.load({ * 'px': 'assets/textures/sky/px.jpg', * 'nx': 'assets/textures/sky/nx.jpg' * 'py': 'assets/textures/sky/py.jpg' * 'ny': 'assets/textures/sky/ny.jpg' * 'pz': 'assets/textures/sky/pz.jpg' * 'nz': 'assets/textures/sky/nz.jpg' * }); * mat.set('environmentMap', envMap); * ... * envMap.onload(() => { * // Wait for the sky texture loaded * animation.on('frame', (frameTime) => { * renderer.render(scene, camera); * }); * }); */ declare class TextureCube extends Texture { readonly textureType = "textureCube"; mipmaps?: TextureCubeSource[]; constructor(opts?: Partial); get width(): number; set width(value: number); get height(): number; set height(value: number); protected _defaultFormat(): number; protected _defaultType(): 5121 | 5124 | 5125 | 5126 | 5131; isPowerOfTwo(): boolean; isRenderable(): boolean; load(srcList: Record, crossOrigin?: string): Promise; } export default TextureCube;