subSurfaceSceneComponent.d.ts 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import type { Nullable } from "../types";
  2. import { Scene } from "../scene";
  3. import type { ISceneSerializableComponent } from "../sceneComponent";
  4. import { SubSurfaceConfiguration } from "./subSurfaceConfiguration";
  5. declare module "../abstractScene" {
  6. interface AbstractScene {
  7. /** @internal (Backing field) */
  8. _subSurfaceConfiguration: Nullable<SubSurfaceConfiguration>;
  9. /**
  10. * Gets or Sets the current prepass renderer associated to the scene.
  11. */
  12. subSurfaceConfiguration: Nullable<SubSurfaceConfiguration>;
  13. /**
  14. * Enables the subsurface effect for prepass
  15. * @returns the SubSurfaceConfiguration
  16. */
  17. enableSubSurfaceForPrePass(): Nullable<SubSurfaceConfiguration>;
  18. /**
  19. * Disables the subsurface effect for prepass
  20. */
  21. disableSubSurfaceForPrePass(): void;
  22. }
  23. }
  24. /**
  25. * Defines the Geometry Buffer scene component responsible to manage a G-Buffer useful
  26. * in several rendering techniques.
  27. */
  28. export declare class SubSurfaceSceneComponent implements ISceneSerializableComponent {
  29. /**
  30. * The component name helpful to identify the component in the list of scene components.
  31. */
  32. readonly name = "PrePassRenderer";
  33. /**
  34. * The scene the component belongs to.
  35. */
  36. scene: Scene;
  37. /**
  38. * Creates a new instance of the component for the given scene
  39. * @param scene Defines the scene to register the component in
  40. */
  41. constructor(scene: Scene);
  42. /**
  43. * Registers the component in a given scene
  44. */
  45. register(): void;
  46. /**
  47. * Serializes the component data to the specified json object
  48. * @param serializationObject The object to serialize to
  49. */
  50. serialize(serializationObject: any): void;
  51. /**
  52. * Adds all the elements from the container to the scene
  53. */
  54. addFromContainer(): void;
  55. /**
  56. * Removes all the elements in the container from the scene
  57. */
  58. removeFromContainer(): void;
  59. /**
  60. * Rebuilds the elements related to this component in case of
  61. * context lost for instance.
  62. */
  63. rebuild(): void;
  64. /**
  65. * Disposes the component and the associated resources
  66. */
  67. dispose(): void;
  68. }