babylon.waterMaterial.d.ts 3.5 KB

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