babylon.waterMaterial.d.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 {boolean}: Add a smaller moving bump to less steady waves.
  30. */
  31. bumpSuperimpose: boolean;
  32. /**
  33. * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
  34. */
  35. fresnelSeparate: boolean;
  36. /**
  37. * @param {boolean}: bump Waves modify the reflection.
  38. */
  39. bumpAffectsReflection: boolean;
  40. /**
  41. * @param {number}: The water color blended with the refraction (near)
  42. */
  43. waterColor: Color3;
  44. /**
  45. * @param {number}: The blend factor related to the water color
  46. */
  47. colorBlendFactor: number;
  48. /**
  49. * @param {number}: The water color blended with the reflection (far)
  50. */
  51. waterColor2: Color3;
  52. /**
  53. * @param {number}: The blend factor related to the water color (reflection, far)
  54. */
  55. colorBlendFactor2: number;
  56. /**
  57. * @param {number}: Represents the maximum length of a wave
  58. */
  59. waveLength: number;
  60. /**
  61. * @param {number}: Defines the waves speed
  62. */
  63. waveSpeed: number;
  64. private _mesh;
  65. private _refractionRTT;
  66. private _reflectionRTT;
  67. private _material;
  68. private _reflectionTransform;
  69. private _lastTime;
  70. private _renderId;
  71. private _defines;
  72. private _cachedDefines;
  73. private _useLogarithmicDepth;
  74. /**
  75. * Constructor
  76. */
  77. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  78. useLogarithmicDepth: boolean;
  79. refractionTexture: RenderTargetTexture;
  80. reflectionTexture: RenderTargetTexture;
  81. addToRenderList(node: any): void;
  82. enableRenderTargets(enable: boolean): void;
  83. getRenderList(): AbstractMesh[];
  84. renderTargetsEnabled: boolean;
  85. needAlphaBlending(): boolean;
  86. needAlphaTesting(): boolean;
  87. getAlphaTestTexture(): BaseTexture;
  88. private _checkCache(scene, mesh?, useInstances?);
  89. isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
  90. bindOnlyWorldMatrix(world: Matrix): void;
  91. bind(world: Matrix, mesh?: Mesh): void;
  92. private _createRenderTargets(scene, renderTargetSize);
  93. getAnimatables(): IAnimatable[];
  94. dispose(forceDisposeEffect?: boolean): void;
  95. clone(name: string): WaterMaterial;
  96. serialize(): any;
  97. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  98. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  99. }
  100. }