babylonjs.materials.d.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. /*BabylonJS Materials*/
  2. // Dependencies for this module:
  3. // ../../../../Tools/Gulp/babylonjs
  4. declare module BABYLON {
  5. export class CellMaterial extends BABYLON.PushMaterial {
  6. diffuseTexture: BABYLON.BaseTexture;
  7. diffuseColor: BABYLON.Color3;
  8. _computeHighLevel: boolean;
  9. computeHighLevel: boolean;
  10. disableLighting: boolean;
  11. maxSimultaneousLights: number;
  12. constructor(name: string, scene: BABYLON.Scene);
  13. needAlphaBlending(): boolean;
  14. needAlphaTesting(): boolean;
  15. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  16. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  17. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  18. getAnimatables(): BABYLON.IAnimatable[];
  19. getActiveTextures(): BABYLON.BaseTexture[];
  20. hasTexture(texture: BABYLON.BaseTexture): boolean;
  21. dispose(forceDisposeEffect?: boolean): void;
  22. getClassName(): string;
  23. clone(name: string): CellMaterial;
  24. serialize(): any;
  25. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): CellMaterial;
  26. }
  27. }
  28. declare module BABYLON {
  29. export class CustomShaderStructure {
  30. FragmentStore: string;
  31. VertexStore: string;
  32. constructor();
  33. }
  34. export class ShaderSpecialParts {
  35. constructor();
  36. Fragment_Begin: string;
  37. Fragment_Definitions: string;
  38. Fragment_MainBegin: string;
  39. Fragment_Custom_Diffuse: string;
  40. Fragment_Custom_Alpha: string;
  41. Fragment_Before_FragColor: string;
  42. Vertex_Begin: string;
  43. Vertex_Definitions: string;
  44. Vertex_MainBegin: string;
  45. Vertex_Before_PositionUpdated: string;
  46. Vertex_Before_NormalUpdated: string;
  47. }
  48. export class CustomMaterial extends BABYLON.StandardMaterial {
  49. static ShaderIndexer: number;
  50. CustomParts: ShaderSpecialParts;
  51. _isCreatedShader: boolean;
  52. _createdShaderName: string;
  53. _customUniform: string[];
  54. _newUniforms: string[];
  55. _newUniformInstances: any[];
  56. _newSamplerInstances: BABYLON.Texture[];
  57. FragmentShader: string;
  58. VertexShader: string;
  59. AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
  60. ReviewUniform(name: string, arr: string[]): string[];
  61. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.StandardMaterialDefines): string;
  62. constructor(name: string, scene: BABYLON.Scene);
  63. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  64. Fragment_Begin(shaderPart: string): CustomMaterial;
  65. Fragment_Definitions(shaderPart: string): CustomMaterial;
  66. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  67. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  68. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  69. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  70. Vertex_Begin(shaderPart: string): CustomMaterial;
  71. Vertex_Definitions(shaderPart: string): CustomMaterial;
  72. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  73. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  74. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  75. }
  76. }
  77. declare module BABYLON {
  78. export class FireMaterial extends BABYLON.PushMaterial {
  79. diffuseTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  80. distortionTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  81. opacityTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  82. diffuseColor: BABYLON.Color3;
  83. speed: number;
  84. constructor(name: string, scene: BABYLON.Scene);
  85. needAlphaBlending(): boolean;
  86. needAlphaTesting(): boolean;
  87. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  88. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  89. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  90. getAnimatables(): BABYLON.IAnimatable[];
  91. getActiveTextures(): BABYLON.BaseTexture[];
  92. hasTexture(texture: BABYLON.BaseTexture): boolean;
  93. getClassName(): string;
  94. dispose(forceDisposeEffect?: boolean): void;
  95. clone(name: string): FireMaterial;
  96. serialize(): any;
  97. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FireMaterial;
  98. }
  99. }
  100. declare module BABYLON {
  101. export class FurMaterial extends BABYLON.PushMaterial {
  102. diffuseTexture: BABYLON.BaseTexture;
  103. heightTexture: BABYLON.BaseTexture;
  104. diffuseColor: BABYLON.Color3;
  105. furLength: number;
  106. furAngle: number;
  107. furColor: BABYLON.Color3;
  108. furOffset: number;
  109. furSpacing: number;
  110. furGravity: BABYLON.Vector3;
  111. furSpeed: number;
  112. furDensity: number;
  113. furOcclusion: number;
  114. furTexture: BABYLON.DynamicTexture;
  115. disableLighting: boolean;
  116. maxSimultaneousLights: number;
  117. highLevelFur: boolean;
  118. _meshes: BABYLON.AbstractMesh[];
  119. constructor(name: string, scene: BABYLON.Scene);
  120. furTime: number;
  121. needAlphaBlending(): boolean;
  122. needAlphaTesting(): boolean;
  123. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  124. updateFur(): void;
  125. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  126. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  127. getAnimatables(): BABYLON.IAnimatable[];
  128. getActiveTextures(): BABYLON.BaseTexture[];
  129. hasTexture(texture: BABYLON.BaseTexture): boolean;
  130. dispose(forceDisposeEffect?: boolean): void;
  131. clone(name: string): FurMaterial;
  132. serialize(): any;
  133. getClassName(): string;
  134. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FurMaterial;
  135. static GenerateTexture(name: string, scene: BABYLON.Scene): BABYLON.DynamicTexture;
  136. static FurifyMesh(sourceMesh: BABYLON.Mesh, quality: number): BABYLON.Mesh[];
  137. }
  138. }
  139. declare module BABYLON {
  140. export class GradientMaterial extends BABYLON.PushMaterial {
  141. maxSimultaneousLights: number;
  142. topColor: BABYLON.Color3;
  143. topColorAlpha: number;
  144. bottomColor: BABYLON.Color3;
  145. bottomColorAlpha: number;
  146. offset: number;
  147. scale: number;
  148. smoothness: number;
  149. disableLighting: boolean;
  150. constructor(name: string, scene: BABYLON.Scene);
  151. needAlphaBlending(): boolean;
  152. needAlphaTesting(): boolean;
  153. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  154. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  155. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  156. getAnimatables(): BABYLON.IAnimatable[];
  157. dispose(forceDisposeEffect?: boolean): void;
  158. clone(name: string): GradientMaterial;
  159. serialize(): any;
  160. getClassName(): string;
  161. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GradientMaterial;
  162. }
  163. }
  164. declare module BABYLON {
  165. /**
  166. * The grid materials allows you to wrap any shape with a grid.
  167. * Colors are customizable.
  168. */
  169. export class GridMaterial extends BABYLON.PushMaterial {
  170. /**
  171. * Main color of the grid (e.g. between lines)
  172. */
  173. mainColor: BABYLON.Color3;
  174. /**
  175. * Color of the grid lines.
  176. */
  177. lineColor: BABYLON.Color3;
  178. /**
  179. * The scale of the grid compared to unit.
  180. */
  181. gridRatio: number;
  182. /**
  183. * Allows setting an offset for the grid lines.
  184. */
  185. gridOffset: BABYLON.Vector3;
  186. /**
  187. * The frequency of thicker lines.
  188. */
  189. majorUnitFrequency: number;
  190. /**
  191. * The visibility of minor units in the grid.
  192. */
  193. minorUnitVisibility: number;
  194. /**
  195. * The grid opacity outside of the lines.
  196. */
  197. opacity: number;
  198. /**
  199. * Determine RBG output is premultiplied by alpha value.
  200. */
  201. preMultiplyAlpha: boolean;
  202. /**
  203. * constructor
  204. * @param name The name given to the material in order to identify it afterwards.
  205. * @param scene The scene the material is used in.
  206. */
  207. constructor(name: string, scene: BABYLON.Scene);
  208. /**
  209. * Returns wehter or not the grid requires alpha blending.
  210. */
  211. needAlphaBlending(): boolean;
  212. needAlphaBlendingForMesh(mesh: BABYLON.AbstractMesh): boolean;
  213. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  214. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  215. dispose(forceDisposeEffect?: boolean): void;
  216. clone(name: string): GridMaterial;
  217. serialize(): any;
  218. getClassName(): string;
  219. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GridMaterial;
  220. }
  221. }
  222. declare module BABYLON {
  223. export class LavaMaterial extends BABYLON.PushMaterial {
  224. diffuseTexture: BABYLON.BaseTexture;
  225. noiseTexture: BABYLON.BaseTexture;
  226. fogColor: BABYLON.Color3;
  227. speed: number;
  228. movingSpeed: number;
  229. lowFrequencySpeed: number;
  230. fogDensity: number;
  231. diffuseColor: BABYLON.Color3;
  232. disableLighting: boolean;
  233. unlit: boolean;
  234. maxSimultaneousLights: number;
  235. constructor(name: string, scene: BABYLON.Scene);
  236. needAlphaBlending(): boolean;
  237. needAlphaTesting(): boolean;
  238. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  239. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  240. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  241. getAnimatables(): BABYLON.IAnimatable[];
  242. getActiveTextures(): BABYLON.BaseTexture[];
  243. hasTexture(texture: BABYLON.BaseTexture): boolean;
  244. dispose(forceDisposeEffect?: boolean): void;
  245. clone(name: string): LavaMaterial;
  246. serialize(): any;
  247. getClassName(): string;
  248. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): LavaMaterial;
  249. }
  250. }
  251. declare module BABYLON {
  252. export class MixMaterial extends BABYLON.PushMaterial {
  253. mixTexture1: BABYLON.BaseTexture;
  254. mixTexture2: BABYLON.BaseTexture;
  255. diffuseTexture1: BABYLON.Texture;
  256. diffuseTexture2: BABYLON.Texture;
  257. diffuseTexture3: BABYLON.Texture;
  258. diffuseTexture4: BABYLON.Texture;
  259. diffuseTexture5: BABYLON.Texture;
  260. diffuseTexture6: BABYLON.Texture;
  261. diffuseTexture7: BABYLON.Texture;
  262. diffuseTexture8: BABYLON.Texture;
  263. /**
  264. * Uniforms
  265. */
  266. diffuseColor: BABYLON.Color3;
  267. specularColor: BABYLON.Color3;
  268. specularPower: number;
  269. disableLighting: boolean;
  270. maxSimultaneousLights: number;
  271. constructor(name: string, scene: BABYLON.Scene);
  272. needAlphaBlending(): boolean;
  273. needAlphaTesting(): boolean;
  274. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  275. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  276. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  277. getAnimatables(): BABYLON.IAnimatable[];
  278. getActiveTextures(): BABYLON.BaseTexture[];
  279. hasTexture(texture: BABYLON.BaseTexture): boolean;
  280. dispose(forceDisposeEffect?: boolean): void;
  281. clone(name: string): MixMaterial;
  282. serialize(): any;
  283. getClassName(): string;
  284. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MixMaterial;
  285. }
  286. }
  287. declare module BABYLON {
  288. export class NormalMaterial extends BABYLON.PushMaterial {
  289. diffuseTexture: BABYLON.BaseTexture;
  290. diffuseColor: BABYLON.Color3;
  291. disableLighting: boolean;
  292. maxSimultaneousLights: number;
  293. constructor(name: string, scene: BABYLON.Scene);
  294. needAlphaBlending(): boolean;
  295. needAlphaTesting(): boolean;
  296. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  297. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  298. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  299. getAnimatables(): BABYLON.IAnimatable[];
  300. getActiveTextures(): BABYLON.BaseTexture[];
  301. hasTexture(texture: BABYLON.BaseTexture): boolean;
  302. dispose(forceDisposeEffect?: boolean): void;
  303. clone(name: string): NormalMaterial;
  304. serialize(): any;
  305. getClassName(): string;
  306. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): NormalMaterial;
  307. }
  308. }
  309. declare module BABYLON {
  310. export class ShadowOnlyMaterial extends BABYLON.PushMaterial {
  311. constructor(name: string, scene: BABYLON.Scene);
  312. shadowColor: BABYLON.Color3;
  313. needAlphaBlending(): boolean;
  314. needAlphaTesting(): boolean;
  315. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  316. activeLight: BABYLON.IShadowLight;
  317. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  318. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  319. clone(name: string): ShadowOnlyMaterial;
  320. serialize(): any;
  321. getClassName(): string;
  322. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): ShadowOnlyMaterial;
  323. }
  324. }
  325. declare module BABYLON {
  326. export class SimpleMaterial extends BABYLON.PushMaterial {
  327. diffuseTexture: BABYLON.BaseTexture;
  328. diffuseColor: BABYLON.Color3;
  329. disableLighting: boolean;
  330. maxSimultaneousLights: number;
  331. constructor(name: string, scene: BABYLON.Scene);
  332. needAlphaBlending(): boolean;
  333. needAlphaTesting(): boolean;
  334. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  335. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  336. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  337. getAnimatables(): BABYLON.IAnimatable[];
  338. getActiveTextures(): BABYLON.BaseTexture[];
  339. hasTexture(texture: BABYLON.BaseTexture): boolean;
  340. dispose(forceDisposeEffect?: boolean): void;
  341. clone(name: string): SimpleMaterial;
  342. serialize(): any;
  343. getClassName(): string;
  344. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SimpleMaterial;
  345. }
  346. }
  347. declare module BABYLON {
  348. export class SkyMaterial extends BABYLON.PushMaterial {
  349. luminance: number;
  350. turbidity: number;
  351. rayleigh: number;
  352. mieCoefficient: number;
  353. mieDirectionalG: number;
  354. distance: number;
  355. inclination: number;
  356. azimuth: number;
  357. sunPosition: BABYLON.Vector3;
  358. useSunPosition: boolean;
  359. constructor(name: string, scene: BABYLON.Scene);
  360. needAlphaBlending(): boolean;
  361. needAlphaTesting(): boolean;
  362. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  363. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  364. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  365. getAnimatables(): BABYLON.IAnimatable[];
  366. dispose(forceDisposeEffect?: boolean): void;
  367. clone(name: string): SkyMaterial;
  368. serialize(): any;
  369. getClassName(): string;
  370. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SkyMaterial;
  371. }
  372. }
  373. declare module BABYLON {
  374. export class TerrainMaterial extends BABYLON.PushMaterial {
  375. mixTexture: BABYLON.BaseTexture;
  376. diffuseTexture1: BABYLON.Texture;
  377. diffuseTexture2: BABYLON.Texture;
  378. diffuseTexture3: BABYLON.Texture;
  379. bumpTexture1: BABYLON.Texture;
  380. bumpTexture2: BABYLON.Texture;
  381. bumpTexture3: BABYLON.Texture;
  382. diffuseColor: BABYLON.Color3;
  383. specularColor: BABYLON.Color3;
  384. specularPower: number;
  385. disableLighting: boolean;
  386. maxSimultaneousLights: number;
  387. constructor(name: string, scene: BABYLON.Scene);
  388. needAlphaBlending(): boolean;
  389. needAlphaTesting(): boolean;
  390. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  391. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  392. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  393. getAnimatables(): BABYLON.IAnimatable[];
  394. getActiveTextures(): BABYLON.BaseTexture[];
  395. hasTexture(texture: BABYLON.BaseTexture): boolean;
  396. dispose(forceDisposeEffect?: boolean): void;
  397. clone(name: string): TerrainMaterial;
  398. serialize(): any;
  399. getClassName(): string;
  400. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TerrainMaterial;
  401. }
  402. }
  403. declare module BABYLON {
  404. export class TriPlanarMaterial extends BABYLON.PushMaterial {
  405. mixTexture: BABYLON.BaseTexture;
  406. diffuseTextureX: BABYLON.BaseTexture;
  407. diffuseTextureY: BABYLON.BaseTexture;
  408. diffuseTextureZ: BABYLON.BaseTexture;
  409. normalTextureX: BABYLON.BaseTexture;
  410. normalTextureY: BABYLON.BaseTexture;
  411. normalTextureZ: BABYLON.BaseTexture;
  412. tileSize: number;
  413. diffuseColor: BABYLON.Color3;
  414. specularColor: BABYLON.Color3;
  415. specularPower: number;
  416. disableLighting: boolean;
  417. maxSimultaneousLights: number;
  418. constructor(name: string, scene: BABYLON.Scene);
  419. needAlphaBlending(): boolean;
  420. needAlphaTesting(): boolean;
  421. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  422. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  423. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  424. getAnimatables(): BABYLON.IAnimatable[];
  425. getActiveTextures(): BABYLON.BaseTexture[];
  426. hasTexture(texture: BABYLON.BaseTexture): boolean;
  427. dispose(forceDisposeEffect?: boolean): void;
  428. clone(name: string): TriPlanarMaterial;
  429. serialize(): any;
  430. getClassName(): string;
  431. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TriPlanarMaterial;
  432. }
  433. }
  434. declare module BABYLON {
  435. export class WaterMaterial extends BABYLON.PushMaterial {
  436. renderTargetSize: BABYLON.Vector2;
  437. bumpTexture: BABYLON.BaseTexture;
  438. diffuseColor: BABYLON.Color3;
  439. specularColor: BABYLON.Color3;
  440. specularPower: number;
  441. disableLighting: boolean;
  442. maxSimultaneousLights: number;
  443. /**
  444. * @param {number}: Represents the wind force
  445. */
  446. windForce: number;
  447. /**
  448. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  449. */
  450. windDirection: BABYLON.Vector2;
  451. /**
  452. * @param {number}: Wave height, represents the height of the waves
  453. */
  454. waveHeight: number;
  455. /**
  456. * @param {number}: Bump height, represents the bump height related to the bump map
  457. */
  458. bumpHeight: number;
  459. bumpSuperimpose: boolean;
  460. fresnelSeparate: boolean;
  461. bumpAffectsReflection: boolean;
  462. /**
  463. * @param {number}: The water color blended with the refraction (near)
  464. */
  465. waterColor: BABYLON.Color3;
  466. /**
  467. * @param {number}: The blend factor related to the water color
  468. */
  469. colorBlendFactor: number;
  470. /**
  471. * @param {number}: The water color blended with the reflection (far)
  472. */
  473. waterColor2: BABYLON.Color3;
  474. /**
  475. * @param {number}: The blend factor related to the water color (reflection, far)
  476. */
  477. colorBlendFactor2: number;
  478. /**
  479. * @param {number}: Represents the maximum length of a wave
  480. */
  481. waveLength: number;
  482. /**
  483. * @param {number}: Defines the waves speed
  484. */
  485. waveSpeed: number;
  486. protected _renderTargets: BABYLON.SmartArray<BABYLON.RenderTargetTexture>;
  487. /**
  488. * Gets a boolean indicating that current material needs to register RTT
  489. */
  490. readonly hasRenderTargetTextures: boolean;
  491. /**
  492. * Constructor
  493. */
  494. constructor(name: string, scene: BABYLON.Scene, renderTargetSize?: BABYLON.Vector2);
  495. useLogarithmicDepth: boolean;
  496. readonly refractionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  497. readonly reflectionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  498. addToRenderList(node: any): void;
  499. enableRenderTargets(enable: boolean): void;
  500. getRenderList(): BABYLON.Nullable<BABYLON.AbstractMesh[]>;
  501. readonly renderTargetsEnabled: boolean;
  502. needAlphaBlending(): boolean;
  503. needAlphaTesting(): boolean;
  504. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  505. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  506. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  507. getAnimatables(): BABYLON.IAnimatable[];
  508. getActiveTextures(): BABYLON.BaseTexture[];
  509. hasTexture(texture: BABYLON.BaseTexture): boolean;
  510. dispose(forceDisposeEffect?: boolean): void;
  511. clone(name: string): WaterMaterial;
  512. serialize(): any;
  513. getClassName(): string;
  514. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): WaterMaterial;
  515. static CreateDefaultMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
  516. }
  517. }