cubemapToSphericalPolynomial.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { SphericalPolynomial } from "../../Maths/sphericalPolynomial";
  2. import type { BaseTexture } from "../../Materials/Textures/baseTexture";
  3. import type { Nullable } from "../../types";
  4. import type { CubeMapInfo } from "./panoramaToCubemap";
  5. /**
  6. * Helper class dealing with the extraction of spherical polynomial dataArray
  7. * from a cube map.
  8. */
  9. export declare class CubeMapToSphericalPolynomialTools {
  10. private static _FileFaces;
  11. /** @internal */
  12. static MAX_HDRI_VALUE: number;
  13. /** @internal */
  14. static PRESERVE_CLAMPED_COLORS: boolean;
  15. /**
  16. * Converts a texture to the according Spherical Polynomial data.
  17. * This extracts the first 3 orders only as they are the only one used in the lighting.
  18. *
  19. * @param texture The texture to extract the information from.
  20. * @returns The Spherical Polynomial data.
  21. */
  22. static ConvertCubeMapTextureToSphericalPolynomial(texture: BaseTexture): Nullable<Promise<SphericalPolynomial>>;
  23. /**
  24. * Compute the area on the unit sphere of the rectangle defined by (x,y) and the origin
  25. * See https://www.rorydriscoll.com/2012/01/15/cubemap-texel-solid-angle/
  26. * @param x
  27. * @param y
  28. * @returns the area
  29. */
  30. private static _AreaElement;
  31. /**
  32. * Converts a cubemap to the according Spherical Polynomial data.
  33. * This extracts the first 3 orders only as they are the only one used in the lighting.
  34. *
  35. * @param cubeInfo The Cube map to extract the information from.
  36. * @returns The Spherical Polynomial data.
  37. */
  38. static ConvertCubeMapToSphericalPolynomial(cubeInfo: CubeMapInfo): SphericalPolynomial;
  39. }