babylon.waterMaterial.d.ts 2.7 KB

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