lensFlare.d.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. import type { Nullable } from "../types";
  2. import { Color3 } from "../Maths/math.color";
  3. import { Texture } from "../Materials/Textures/texture";
  4. import type { LensFlareSystem } from "./lensFlareSystem";
  5. import { DrawWrapper } from "../Materials/drawWrapper";
  6. /**
  7. * This represents one of the lens effect in a `lensFlareSystem`.
  8. * It controls one of the individual texture used in the effect.
  9. * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/lenseFlare
  10. */
  11. export declare class LensFlare {
  12. /**
  13. * Define the size of the lens flare in the system (a floating value between 0 and 1)
  14. */
  15. size: number;
  16. /**
  17. * Define the position of the lens flare in the system. (a floating value between -1 and 1). A value of 0 is located on the emitter. A value greater than 0 is beyond the emitter and a value lesser than 0 is behind.
  18. */
  19. position: number;
  20. /**
  21. * Define the lens color.
  22. */
  23. color: Color3;
  24. /**
  25. * Define the lens texture.
  26. */
  27. texture: Nullable<Texture>;
  28. /**
  29. * Define the alpha mode to render this particular lens.
  30. */
  31. alphaMode: number;
  32. /** @internal */
  33. _drawWrapper: DrawWrapper;
  34. private _system;
  35. /**
  36. * Creates a new Lens Flare.
  37. * This represents one of the lens effect in a `lensFlareSystem`.
  38. * It controls one of the individual texture used in the effect.
  39. * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/lenseFlare
  40. * @param size Define the size of the lens flare (a floating value between 0 and 1)
  41. * @param position Define the position of the lens flare in the system. (a floating value between -1 and 1). A value of 0 is located on the emitter. A value greater than 0 is beyond the emitter and a value lesser than 0 is behind.
  42. * @param color Define the lens color
  43. * @param imgUrl Define the lens texture url
  44. * @param system Define the `lensFlareSystem` this flare is part of
  45. * @returns The newly created Lens Flare
  46. */
  47. static AddFlare(size: number, position: number, color: Color3, imgUrl: string, system: LensFlareSystem): LensFlare;
  48. /**
  49. * Instantiates a new Lens Flare.
  50. * This represents one of the lens effect in a `lensFlareSystem`.
  51. * It controls one of the individual texture used in the effect.
  52. * @see https://doc.babylonjs.com/features/featuresDeepDive/environment/lenseFlare
  53. * @param size Define the size of the lens flare in the system (a floating value between 0 and 1)
  54. * @param position Define the position of the lens flare in the system. (a floating value between -1 and 1). A value of 0 is located on the emitter. A value greater than 0 is beyond the emitter and a value lesser than 0 is behind.
  55. * @param color Define the lens color
  56. * @param imgUrl Define the lens texture url
  57. * @param system Define the `lensFlareSystem` this flare is part of
  58. */
  59. constructor(
  60. /**
  61. * Define the size of the lens flare in the system (a floating value between 0 and 1)
  62. */
  63. size: number,
  64. /**
  65. * Define the position of the lens flare in the system. (a floating value between -1 and 1). A value of 0 is located on the emitter. A value greater than 0 is beyond the emitter and a value lesser than 0 is behind.
  66. */
  67. position: number, color: Color3, imgUrl: string, system: LensFlareSystem);
  68. /**
  69. * Dispose and release the lens flare with its associated resources.
  70. */
  71. dispose(): void;
  72. }