rawCubeTexture.d.ts 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import type { Nullable } from "../../types";
  2. import type { Scene } from "../../scene";
  3. import type { SphericalPolynomial } from "../../Maths/sphericalPolynomial";
  4. import { CubeTexture } from "./cubeTexture";
  5. import "../../Engines/Extensions/engine.rawTexture";
  6. /**
  7. * Raw cube texture where the raw buffers are passed in
  8. */
  9. export declare class RawCubeTexture extends CubeTexture {
  10. /**
  11. * Creates a cube texture where the raw buffers are passed in.
  12. * @param scene defines the scene the texture is attached to
  13. * @param data defines the array of data to use to create each face
  14. * @param size defines the size of the textures
  15. * @param format defines the format of the data
  16. * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
  17. * @param generateMipMaps defines if the engine should generate the mip levels
  18. * @param invertY defines if data must be stored with Y axis inverted
  19. * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
  20. * @param compression defines the compression used (null by default)
  21. */
  22. constructor(scene: Scene, data: Nullable<ArrayBufferView[]>, size: number, format?: number, type?: number, generateMipMaps?: boolean, invertY?: boolean, samplingMode?: number, compression?: Nullable<string>);
  23. /**
  24. * Updates the raw cube texture.
  25. * @param data defines the data to store
  26. * @param format defines the data format
  27. * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
  28. * @param invertY defines if data must be stored with Y axis inverted
  29. * @param compression defines the compression used (null by default)
  30. */
  31. update(data: ArrayBufferView[], format: number, type: number, invertY: boolean, compression?: Nullable<string>): void;
  32. /**
  33. * Updates a raw cube texture with RGBD encoded data.
  34. * @param data defines the array of data [mipmap][face] to use to create each face
  35. * @param sphericalPolynomial defines the spherical polynomial for irradiance
  36. * @param lodScale defines the scale applied to environment texture. This manages the range of LOD level used for IBL according to the roughness
  37. * @param lodOffset defines the offset applied to environment texture. This manages first LOD level used for IBL according to the roughness
  38. * @returns a promise that resolves when the operation is complete
  39. */
  40. updateRGBDAsync(data: ArrayBufferView[][], sphericalPolynomial?: Nullable<SphericalPolynomial>, lodScale?: number, lodOffset?: number): Promise<void>;
  41. /**
  42. * Clones the raw cube texture.
  43. * @returns a new cube texture
  44. */
  45. clone(): CubeTexture;
  46. }