fluidRenderingObjectParticleSystem.d.ts 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import type { VertexBuffer } from "../../Buffers/buffer.js";
  2. import type { DataBuffer } from "../../Buffers/dataBuffer.js";
  3. import type { IParticleSystem } from "../../Particles/IParticleSystem.js";
  4. import type { Scene } from "../../scene.js";
  5. import type { Nullable } from "../../types.js";
  6. import { FluidRenderingObject } from "./fluidRenderingObject";
  7. /**
  8. * Defines a rendering object based on a particle system
  9. */
  10. export declare class FluidRenderingObjectParticleSystem extends FluidRenderingObject {
  11. private _particleSystem;
  12. private _originalRender;
  13. private _blendMode;
  14. private _onBeforeDrawParticleObserver;
  15. private _updateInAnimate;
  16. /** Gets the particle system */
  17. get particleSystem(): IParticleSystem;
  18. /**
  19. * @returns the name of the class
  20. */
  21. getClassName(): string;
  22. private _useTrueRenderingForDiffuseTexture;
  23. /**
  24. * Gets or sets a boolean indicating that the diffuse texture should be generated based on the regular rendering of the particle system (default: true).
  25. * Sometimes, generating the diffuse texture this way may be sub-optimal. In that case, you can disable this property, in which case the particle system will be
  26. * rendered using a ALPHA_COMBINE mode instead of the one used by the particle system.
  27. */
  28. get useTrueRenderingForDiffuseTexture(): boolean;
  29. set useTrueRenderingForDiffuseTexture(use: boolean);
  30. /**
  31. * Gets the vertex buffers
  32. */
  33. get vertexBuffers(): {
  34. [key: string]: VertexBuffer;
  35. };
  36. /**
  37. * Gets the index buffer (or null if the object is using instancing)
  38. */
  39. get indexBuffer(): Nullable<DataBuffer>;
  40. /**
  41. * Creates a new instance of the class
  42. * @param scene The scene the particle system is part of
  43. * @param ps The particle system
  44. */
  45. constructor(scene: Scene, ps: IParticleSystem);
  46. /**
  47. * Indicates if the object is ready to be rendered
  48. * @returns True if everything is ready for the object to be rendered, otherwise false
  49. */
  50. isReady(): boolean;
  51. /**
  52. * Gets the number of particles in this particle system
  53. * @returns The number of particles
  54. */
  55. get numParticles(): number;
  56. /**
  57. * Render the diffuse texture for this object
  58. */
  59. renderDiffuseTexture(): void;
  60. /**
  61. * Releases the ressources used by the class
  62. */
  63. dispose(): void;
  64. }