babylon.waterMaterial.d.ts 3.6 KB

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