depthPeelingSceneComponent.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { Scene } from "../scene";
  2. import type { ISceneComponent } from "../sceneComponent";
  3. import type { Nullable } from "../types";
  4. import { DepthPeelingRenderer } from "./depthPeelingRenderer";
  5. declare module "../scene" {
  6. interface Scene {
  7. /**
  8. * The depth peeling renderer
  9. */
  10. depthPeelingRenderer: Nullable<DepthPeelingRenderer>;
  11. /** @internal (Backing field) */
  12. _depthPeelingRenderer: Nullable<DepthPeelingRenderer>;
  13. /**
  14. * Flag to indicate if we want to use order independent transparency, despite the performance hit
  15. */
  16. useOrderIndependentTransparency: boolean;
  17. /** @internal */
  18. _useOrderIndependentTransparency: boolean;
  19. }
  20. }
  21. /**
  22. * Scene component to render order independent transparency with depth peeling
  23. */
  24. export declare class DepthPeelingSceneComponent implements ISceneComponent {
  25. /**
  26. * The component name helpful to identify the component in the list of scene components.
  27. */
  28. readonly name = "DepthPeelingRenderer";
  29. /**
  30. * The scene the component belongs to.
  31. */
  32. scene: Scene;
  33. /**
  34. * Creates a new instance of the component for the given scene
  35. * @param scene Defines the scene to register the component in
  36. */
  37. constructor(scene: Scene);
  38. /**
  39. * Registers the component in a given scene
  40. */
  41. register(): void;
  42. /**
  43. * Rebuilds the elements related to this component in case of
  44. * context lost for instance.
  45. */
  46. rebuild(): void;
  47. /**
  48. * Disposes the component and the associated resources.
  49. */
  50. dispose(): void;
  51. }