babylon.materials.d.ts 24 KB

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