pbrSpecularGlossinessMaterial.d.ts 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import type { Scene } from "../../scene";
  2. import type { Color3 } from "../../Maths/math.color";
  3. import type { BaseTexture } from "../../Materials/Textures/baseTexture";
  4. import { PBRBaseSimpleMaterial } from "./pbrBaseSimpleMaterial";
  5. import type { Nullable } from "../../types";
  6. /**
  7. * The PBR material of BJS following the specular glossiness convention.
  8. *
  9. * This fits to the PBR convention in the GLTF definition:
  10. * https://github.com/KhronosGroup/glTF/tree/2.0/extensions/Khronos/KHR_materials_pbrSpecularGlossiness
  11. */
  12. export declare class PBRSpecularGlossinessMaterial extends PBRBaseSimpleMaterial {
  13. /**
  14. * Specifies the diffuse color of the material.
  15. */
  16. diffuseColor: Color3;
  17. /**
  18. * Specifies the diffuse texture of the material. This can also contains the opacity value in its alpha
  19. * channel.
  20. */
  21. diffuseTexture: Nullable<BaseTexture>;
  22. /**
  23. * Specifies the specular color of the material. This indicates how reflective is the material (none to mirror).
  24. */
  25. specularColor: Color3;
  26. /**
  27. * Specifies the glossiness of the material. This indicates "how sharp is the reflection".
  28. */
  29. glossiness: number;
  30. /**
  31. * Specifies both the specular color RGB and the glossiness A of the material per pixels.
  32. */
  33. specularGlossinessTexture: Nullable<BaseTexture>;
  34. /**
  35. * Specifies if the reflectivity texture contains the glossiness information in its alpha channel.
  36. */
  37. get useMicroSurfaceFromReflectivityMapAlpha(): boolean;
  38. /**
  39. * Instantiates a new PBRSpecularGlossinessMaterial instance.
  40. *
  41. * @param name The material name
  42. * @param scene The scene the material will be use in.
  43. */
  44. constructor(name: string, scene?: Scene);
  45. /**
  46. * @returns the current class name of the material.
  47. */
  48. getClassName(): string;
  49. /**
  50. * Makes a duplicate of the current material.
  51. * @param name - name to use for the new material.
  52. * @returns cloned material instance
  53. */
  54. clone(name: string): PBRSpecularGlossinessMaterial;
  55. /**
  56. * Serialize the material to a parsable JSON object.
  57. * @returns the JSON object
  58. */
  59. serialize(): any;
  60. /**
  61. * Parses a JSON object corresponding to the serialize function.
  62. * @param source - JSON source object.
  63. * @param scene - the scene to parse to.
  64. * @param rootUrl - root url of the assets.
  65. * @returns a new PBRSpecularGlossinessMaterial.
  66. */
  67. static Parse(source: any, scene: Scene, rootUrl: string): PBRSpecularGlossinessMaterial;
  68. }