babylon.waterMaterial.d.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. declare module BABYLON {
  2. class WaterMaterial extends PushMaterial {
  3. renderTargetSize: Vector2;
  4. private _bumpTexture;
  5. bumpTexture: BaseTexture;
  6. diffuseColor: Color3;
  7. specularColor: Color3;
  8. specularPower: number;
  9. private _disableLighting;
  10. disableLighting: boolean;
  11. private _maxSimultaneousLights;
  12. maxSimultaneousLights: number;
  13. /**
  14. * @param {number}: Represents the wind force
  15. */
  16. windForce: number;
  17. /**
  18. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  19. */
  20. windDirection: Vector2;
  21. /**
  22. * @param {number}: Wave height, represents the height of the waves
  23. */
  24. waveHeight: number;
  25. /**
  26. * @param {number}: Bump height, represents the bump height related to the bump map
  27. */
  28. bumpHeight: number;
  29. /**
  30. * @param {boolean}: Add a smaller moving bump to less steady waves.
  31. */
  32. private _bumpSuperimpose;
  33. bumpSuperimpose: boolean;
  34. /**
  35. * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
  36. */
  37. private _fresnelSeparate;
  38. fresnelSeparate: boolean;
  39. /**
  40. * @param {boolean}: bump Waves modify the reflection.
  41. */
  42. private _bumpAffectsReflection;
  43. bumpAffectsReflection: boolean;
  44. /**
  45. * @param {number}: The water color blended with the refraction (near)
  46. */
  47. waterColor: Color3;
  48. /**
  49. * @param {number}: The blend factor related to the water color
  50. */
  51. colorBlendFactor: number;
  52. /**
  53. * @param {number}: The water color blended with the reflection (far)
  54. */
  55. waterColor2: Color3;
  56. /**
  57. * @param {number}: The blend factor related to the water color (reflection, far)
  58. */
  59. colorBlendFactor2: number;
  60. /**
  61. * @param {number}: Represents the maximum length of a wave
  62. */
  63. waveLength: number;
  64. /**
  65. * @param {number}: Defines the waves speed
  66. */
  67. waveSpeed: number;
  68. private _mesh;
  69. private _refractionRTT;
  70. private _reflectionRTT;
  71. private _material;
  72. private _reflectionTransform;
  73. private _lastTime;
  74. private _renderId;
  75. private _useLogarithmicDepth;
  76. /**
  77. * Constructor
  78. */
  79. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  80. useLogarithmicDepth: boolean;
  81. readonly refractionTexture: RenderTargetTexture;
  82. readonly reflectionTexture: RenderTargetTexture;
  83. addToRenderList(node: any): void;
  84. enableRenderTargets(enable: boolean): void;
  85. getRenderList(): AbstractMesh[];
  86. readonly renderTargetsEnabled: boolean;
  87. needAlphaBlending(): boolean;
  88. needAlphaTesting(): boolean;
  89. getAlphaTestTexture(): BaseTexture;
  90. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  91. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  92. private _createRenderTargets(scene, renderTargetSize);
  93. getAnimatables(): IAnimatable[];
  94. getActiveTextures(): BaseTexture[];
  95. dispose(forceDisposeEffect?: boolean): void;
  96. clone(name: string): WaterMaterial;
  97. serialize(): any;
  98. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  99. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  100. }
  101. }