babylonjs.materials.module.d.ts 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180
  1. /*BabylonJS Materials*/
  2. // Dependencies for this module:
  3. // ../../../../Tools/Gulp/babylonjs
  4. declare module 'babylonjs-materials' {
  5. export * from "babylonjs-materials/src/cell";
  6. export * from "babylonjs-materials/src/custom";
  7. export * from "babylonjs-materials/src/fire";
  8. export * from "babylonjs-materials/src/fur";
  9. export * from "babylonjs-materials/src/gradient";
  10. export * from "babylonjs-materials/src/grid";
  11. export * from "babylonjs-materials/src/lava";
  12. export * from "babylonjs-materials/src/mix";
  13. export * from "babylonjs-materials/src/normal";
  14. export * from "babylonjs-materials/src/shadowOnly";
  15. export * from "babylonjs-materials/src/simple";
  16. export * from "babylonjs-materials/src/sky";
  17. export * from "babylonjs-materials/src/terrain";
  18. export * from "babylonjs-materials/src/triPlanar";
  19. export * from "babylonjs-materials/src/water";
  20. }
  21. declare module 'babylonjs-materials/src/cell' {
  22. export * from "babylonjs-materials/src/cell/cellMaterial";
  23. }
  24. declare module 'babylonjs-materials/src/custom' {
  25. export * from "babylonjs-materials/src/custom/customMaterial";
  26. }
  27. declare module 'babylonjs-materials/src/fire' {
  28. export * from "babylonjs-materials/src/fire/fireMaterial";
  29. }
  30. declare module 'babylonjs-materials/src/fur' {
  31. export * from "babylonjs-materials/src/fur/furMaterial";
  32. }
  33. declare module 'babylonjs-materials/src/gradient' {
  34. export * from "babylonjs-materials/src/gradient/gradientMaterial";
  35. }
  36. declare module 'babylonjs-materials/src/grid' {
  37. export * from "babylonjs-materials/src/grid/gridMaterial";
  38. }
  39. declare module 'babylonjs-materials/src/lava' {
  40. export * from "babylonjs-materials/src/lava/lavaMaterial";
  41. }
  42. declare module 'babylonjs-materials/src/mix' {
  43. export * from "babylonjs-materials/src/mix/mixMaterial";
  44. }
  45. declare module 'babylonjs-materials/src/normal' {
  46. export * from "babylonjs-materials/src/normal/normalMaterial";
  47. }
  48. declare module 'babylonjs-materials/src/shadowOnly' {
  49. export * from "babylonjs-materials/src/shadowOnly/shadowOnlyMaterial";
  50. }
  51. declare module 'babylonjs-materials/src/simple' {
  52. export * from "babylonjs-materials/src/simple/simpleMaterial";
  53. }
  54. declare module 'babylonjs-materials/src/sky' {
  55. export * from "babylonjs-materials/src/sky/skyMaterial";
  56. }
  57. declare module 'babylonjs-materials/src/terrain' {
  58. export * from "babylonjs-materials/src/terrain/terrainMaterial";
  59. }
  60. declare module 'babylonjs-materials/src/triPlanar' {
  61. export * from "babylonjs-materials/src/triPlanar/triPlanarMaterial";
  62. }
  63. declare module 'babylonjs-materials/src/water' {
  64. export * from "babylonjs-materials/src/water/waterMaterial";
  65. }
  66. declare module 'babylonjs-materials/src/cell/cellMaterial' {
  67. import { PushMaterial, BaseTexture, Scene, Color3, AbstractMesh, Nullable, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  68. import "./cell.fragment";
  69. import "./cell.vertex";
  70. export class CellMaterial extends PushMaterial {
  71. diffuseTexture: BaseTexture;
  72. diffuseColor: Color3;
  73. _computeHighLevel: boolean;
  74. computeHighLevel: boolean;
  75. disableLighting: boolean;
  76. maxSimultaneousLights: number;
  77. constructor(name: string, scene: Scene);
  78. needAlphaBlending(): boolean;
  79. needAlphaTesting(): boolean;
  80. getAlphaTestTexture(): Nullable<BaseTexture>;
  81. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  82. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  83. getAnimatables(): IAnimatable[];
  84. getActiveTextures(): BaseTexture[];
  85. hasTexture(texture: BaseTexture): boolean;
  86. dispose(forceDisposeEffect?: boolean): void;
  87. getClassName(): string;
  88. clone(name: string): CellMaterial;
  89. serialize(): any;
  90. static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
  91. }
  92. }
  93. declare module 'babylonjs-materials/src/custom/customMaterial' {
  94. import { StandardMaterial, Texture, Mesh, Effect, StandardMaterialDefines, Scene } from "babylonjs";
  95. export class CustomShaderStructure {
  96. FragmentStore: string;
  97. VertexStore: string;
  98. constructor();
  99. }
  100. export class ShaderSpecialParts {
  101. constructor();
  102. Fragment_Begin: string;
  103. Fragment_Definitions: string;
  104. Fragment_MainBegin: string;
  105. Fragment_Custom_Diffuse: string;
  106. Fragment_Custom_Alpha: string;
  107. Fragment_Before_FragColor: string;
  108. Vertex_Begin: string;
  109. Vertex_Definitions: string;
  110. Vertex_MainBegin: string;
  111. Vertex_Before_PositionUpdated: string;
  112. Vertex_Before_NormalUpdated: string;
  113. }
  114. export class CustomMaterial extends StandardMaterial {
  115. static ShaderIndexer: number;
  116. CustomParts: ShaderSpecialParts;
  117. _isCreatedShader: boolean;
  118. _createdShaderName: string;
  119. _customUniform: string[];
  120. _newUniforms: string[];
  121. _newUniformInstances: any[];
  122. _newSamplerInstances: Texture[];
  123. FragmentShader: string;
  124. VertexShader: string;
  125. AttachAfterBind(mesh: Mesh, effect: Effect): void;
  126. ReviewUniform(name: string, arr: string[]): string[];
  127. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
  128. constructor(name: string, scene: Scene);
  129. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  130. Fragment_Begin(shaderPart: string): CustomMaterial;
  131. Fragment_Definitions(shaderPart: string): CustomMaterial;
  132. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  133. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  134. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  135. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  136. Vertex_Begin(shaderPart: string): CustomMaterial;
  137. Vertex_Definitions(shaderPart: string): CustomMaterial;
  138. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  139. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  140. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  141. }
  142. }
  143. declare module 'babylonjs-materials/src/fire/fireMaterial' {
  144. import { PushMaterial, Nullable, BaseTexture, Color3, Scene, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  145. import "./fire.fragment";
  146. import "./fire.vertex";
  147. export class FireMaterial extends PushMaterial {
  148. diffuseTexture: Nullable<BaseTexture>;
  149. distortionTexture: Nullable<BaseTexture>;
  150. opacityTexture: Nullable<BaseTexture>;
  151. diffuseColor: Color3;
  152. speed: number;
  153. constructor(name: string, scene: Scene);
  154. needAlphaBlending(): boolean;
  155. needAlphaTesting(): boolean;
  156. getAlphaTestTexture(): Nullable<BaseTexture>;
  157. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  158. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  159. getAnimatables(): IAnimatable[];
  160. getActiveTextures(): BaseTexture[];
  161. hasTexture(texture: BaseTexture): boolean;
  162. getClassName(): string;
  163. dispose(forceDisposeEffect?: boolean): void;
  164. clone(name: string): FireMaterial;
  165. serialize(): any;
  166. static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
  167. }
  168. }
  169. declare module 'babylonjs-materials/src/fur/furMaterial' {
  170. import { PushMaterial, BaseTexture, Color3, Vector3, DynamicTexture, AbstractMesh, Scene, Nullable, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  171. import "./fur.fragment";
  172. import "./fur.vertex";
  173. export class FurMaterial extends PushMaterial {
  174. diffuseTexture: BaseTexture;
  175. heightTexture: BaseTexture;
  176. diffuseColor: Color3;
  177. furLength: number;
  178. furAngle: number;
  179. furColor: Color3;
  180. furOffset: number;
  181. furSpacing: number;
  182. furGravity: Vector3;
  183. furSpeed: number;
  184. furDensity: number;
  185. furOcclusion: number;
  186. furTexture: DynamicTexture;
  187. disableLighting: boolean;
  188. maxSimultaneousLights: number;
  189. highLevelFur: boolean;
  190. _meshes: AbstractMesh[];
  191. constructor(name: string, scene: Scene);
  192. furTime: number;
  193. needAlphaBlending(): boolean;
  194. needAlphaTesting(): boolean;
  195. getAlphaTestTexture(): Nullable<BaseTexture>;
  196. updateFur(): void;
  197. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  198. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  199. getAnimatables(): IAnimatable[];
  200. getActiveTextures(): BaseTexture[];
  201. hasTexture(texture: BaseTexture): boolean;
  202. dispose(forceDisposeEffect?: boolean): void;
  203. clone(name: string): FurMaterial;
  204. serialize(): any;
  205. getClassName(): string;
  206. static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
  207. static GenerateTexture(name: string, scene: Scene): DynamicTexture;
  208. static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
  209. }
  210. }
  211. declare module 'babylonjs-materials/src/gradient/gradientMaterial' {
  212. import { PushMaterial, Color3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  213. import "./gradient.fragment";
  214. import "./gradient.vertex";
  215. export class GradientMaterial extends PushMaterial {
  216. maxSimultaneousLights: number;
  217. topColor: Color3;
  218. topColorAlpha: number;
  219. bottomColor: Color3;
  220. bottomColorAlpha: number;
  221. offset: number;
  222. scale: number;
  223. smoothness: number;
  224. disableLighting: boolean;
  225. constructor(name: string, scene: Scene);
  226. needAlphaBlending(): boolean;
  227. needAlphaTesting(): boolean;
  228. getAlphaTestTexture(): Nullable<BaseTexture>;
  229. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  230. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  231. getAnimatables(): IAnimatable[];
  232. dispose(forceDisposeEffect?: boolean): void;
  233. clone(name: string): GradientMaterial;
  234. serialize(): any;
  235. getClassName(): string;
  236. static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
  237. }
  238. }
  239. declare module 'babylonjs-materials/src/grid/gridMaterial' {
  240. import { Color3, Vector3, Scene, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
  241. import "./grid.fragment";
  242. import "./grid.vertex";
  243. /**
  244. * The grid materials allows you to wrap any shape with a grid.
  245. * Colors are customizable.
  246. */
  247. export class GridMaterial extends BABYLON.PushMaterial {
  248. /**
  249. * Main color of the grid (e.g. between lines)
  250. */
  251. mainColor: Color3;
  252. /**
  253. * Color of the grid lines.
  254. */
  255. lineColor: Color3;
  256. /**
  257. * The scale of the grid compared to unit.
  258. */
  259. gridRatio: number;
  260. /**
  261. * Allows setting an offset for the grid lines.
  262. */
  263. gridOffset: Vector3;
  264. /**
  265. * The frequency of thicker lines.
  266. */
  267. majorUnitFrequency: number;
  268. /**
  269. * The visibility of minor units in the grid.
  270. */
  271. minorUnitVisibility: number;
  272. /**
  273. * The grid opacity outside of the lines.
  274. */
  275. opacity: number;
  276. /**
  277. * Determine RBG output is premultiplied by alpha value.
  278. */
  279. preMultiplyAlpha: boolean;
  280. /**
  281. * constructor
  282. * @param name The name given to the material in order to identify it afterwards.
  283. * @param scene The scene the material is used in.
  284. */
  285. constructor(name: string, scene: Scene);
  286. /**
  287. * Returns wehter or not the grid requires alpha blending.
  288. */
  289. needAlphaBlending(): boolean;
  290. needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
  291. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  292. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  293. /**
  294. * Dispose the material and its associated resources.
  295. * @param forceDisposeEffect will also dispose the used effect when true
  296. */
  297. dispose(forceDisposeEffect?: boolean): void;
  298. clone(name: string): GridMaterial;
  299. serialize(): any;
  300. getClassName(): string;
  301. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  302. }
  303. }
  304. declare module 'babylonjs-materials/src/lava/lavaMaterial' {
  305. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  306. import "./lava.fragment";
  307. import "./lava.vertex";
  308. export class LavaMaterial extends PushMaterial {
  309. diffuseTexture: BaseTexture;
  310. noiseTexture: BaseTexture;
  311. fogColor: Color3;
  312. speed: number;
  313. movingSpeed: number;
  314. lowFrequencySpeed: number;
  315. fogDensity: number;
  316. diffuseColor: Color3;
  317. disableLighting: boolean;
  318. unlit: boolean;
  319. maxSimultaneousLights: number;
  320. constructor(name: string, scene: Scene);
  321. needAlphaBlending(): boolean;
  322. needAlphaTesting(): boolean;
  323. getAlphaTestTexture(): Nullable<BaseTexture>;
  324. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  325. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  326. getAnimatables(): IAnimatable[];
  327. getActiveTextures(): BaseTexture[];
  328. hasTexture(texture: BaseTexture): boolean;
  329. dispose(forceDisposeEffect?: boolean): void;
  330. clone(name: string): LavaMaterial;
  331. serialize(): any;
  332. getClassName(): string;
  333. static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
  334. }
  335. }
  336. declare module 'babylonjs-materials/src/mix/mixMaterial' {
  337. import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  338. import "./mix.fragment";
  339. import "./mix.vertex";
  340. export class MixMaterial extends PushMaterial {
  341. mixTexture1: BaseTexture;
  342. mixTexture2: BaseTexture;
  343. diffuseTexture1: Texture;
  344. diffuseTexture2: Texture;
  345. diffuseTexture3: Texture;
  346. diffuseTexture4: Texture;
  347. diffuseTexture5: Texture;
  348. diffuseTexture6: Texture;
  349. diffuseTexture7: Texture;
  350. diffuseTexture8: Texture;
  351. /**
  352. * Uniforms
  353. */
  354. diffuseColor: Color3;
  355. specularColor: Color3;
  356. specularPower: number;
  357. disableLighting: boolean;
  358. maxSimultaneousLights: number;
  359. constructor(name: string, scene: Scene);
  360. needAlphaBlending(): boolean;
  361. needAlphaTesting(): boolean;
  362. getAlphaTestTexture(): Nullable<BaseTexture>;
  363. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  364. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  365. getAnimatables(): IAnimatable[];
  366. getActiveTextures(): BaseTexture[];
  367. hasTexture(texture: BaseTexture): boolean;
  368. dispose(forceDisposeEffect?: boolean): void;
  369. clone(name: string): MixMaterial;
  370. serialize(): any;
  371. getClassName(): string;
  372. static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
  373. }
  374. }
  375. declare module 'babylonjs-materials/src/normal/normalMaterial' {
  376. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  377. import "./normal.fragment";
  378. import "./normal.vertex";
  379. export class NormalMaterial extends PushMaterial {
  380. diffuseTexture: BaseTexture;
  381. diffuseColor: Color3;
  382. disableLighting: boolean;
  383. maxSimultaneousLights: number;
  384. constructor(name: string, scene: Scene);
  385. needAlphaBlending(): boolean;
  386. needAlphaTesting(): boolean;
  387. getAlphaTestTexture(): Nullable<BaseTexture>;
  388. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  389. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  390. getAnimatables(): IAnimatable[];
  391. getActiveTextures(): BaseTexture[];
  392. hasTexture(texture: BaseTexture): boolean;
  393. dispose(forceDisposeEffect?: boolean): void;
  394. clone(name: string): NormalMaterial;
  395. serialize(): any;
  396. getClassName(): string;
  397. static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
  398. }
  399. }
  400. declare module 'babylonjs-materials/src/shadowOnly/shadowOnlyMaterial' {
  401. import { PushMaterial, IShadowLight, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
  402. import "./shadowOnly.fragment";
  403. import "./shadowOnly.vertex";
  404. export class ShadowOnlyMaterial extends PushMaterial {
  405. constructor(name: string, scene: Scene);
  406. shadowColor: BABYLON.Color3;
  407. needAlphaBlending(): boolean;
  408. needAlphaTesting(): boolean;
  409. getAlphaTestTexture(): Nullable<BaseTexture>;
  410. activeLight: IShadowLight;
  411. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  412. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  413. clone(name: string): ShadowOnlyMaterial;
  414. serialize(): any;
  415. getClassName(): string;
  416. static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
  417. }
  418. }
  419. declare module 'babylonjs-materials/src/simple/simpleMaterial' {
  420. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  421. import "./simple.fragment";
  422. import "./simple.vertex";
  423. export class SimpleMaterial extends PushMaterial {
  424. diffuseTexture: BaseTexture;
  425. diffuseColor: Color3;
  426. disableLighting: boolean;
  427. maxSimultaneousLights: number;
  428. constructor(name: string, scene: Scene);
  429. needAlphaBlending(): boolean;
  430. needAlphaTesting(): boolean;
  431. getAlphaTestTexture(): Nullable<BaseTexture>;
  432. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  433. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  434. getAnimatables(): IAnimatable[];
  435. getActiveTextures(): BaseTexture[];
  436. hasTexture(texture: BaseTexture): boolean;
  437. dispose(forceDisposeEffect?: boolean): void;
  438. clone(name: string): SimpleMaterial;
  439. serialize(): any;
  440. getClassName(): string;
  441. static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
  442. }
  443. }
  444. declare module 'babylonjs-materials/src/sky/skyMaterial' {
  445. import { PushMaterial, Vector3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  446. import "./sky.fragment";
  447. import "./sky.vertex";
  448. export class SkyMaterial extends PushMaterial {
  449. luminance: number;
  450. turbidity: number;
  451. rayleigh: number;
  452. mieCoefficient: number;
  453. mieDirectionalG: number;
  454. distance: number;
  455. inclination: number;
  456. azimuth: number;
  457. sunPosition: Vector3;
  458. useSunPosition: boolean;
  459. constructor(name: string, scene: Scene);
  460. needAlphaBlending(): boolean;
  461. needAlphaTesting(): boolean;
  462. getAlphaTestTexture(): Nullable<BaseTexture>;
  463. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  464. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  465. getAnimatables(): IAnimatable[];
  466. dispose(forceDisposeEffect?: boolean): void;
  467. clone(name: string): SkyMaterial;
  468. serialize(): any;
  469. getClassName(): string;
  470. static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
  471. }
  472. }
  473. declare module 'babylonjs-materials/src/terrain/terrainMaterial' {
  474. import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  475. import "./terrain.fragment";
  476. import "./terrain.vertex";
  477. export class TerrainMaterial extends PushMaterial {
  478. mixTexture: BaseTexture;
  479. diffuseTexture1: Texture;
  480. diffuseTexture2: Texture;
  481. diffuseTexture3: Texture;
  482. bumpTexture1: Texture;
  483. bumpTexture2: Texture;
  484. bumpTexture3: Texture;
  485. diffuseColor: Color3;
  486. specularColor: Color3;
  487. specularPower: number;
  488. disableLighting: boolean;
  489. maxSimultaneousLights: number;
  490. constructor(name: string, scene: Scene);
  491. needAlphaBlending(): boolean;
  492. needAlphaTesting(): boolean;
  493. getAlphaTestTexture(): Nullable<BaseTexture>;
  494. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  495. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  496. getAnimatables(): IAnimatable[];
  497. getActiveTextures(): BaseTexture[];
  498. hasTexture(texture: BaseTexture): boolean;
  499. dispose(forceDisposeEffect?: boolean): void;
  500. clone(name: string): TerrainMaterial;
  501. serialize(): any;
  502. getClassName(): string;
  503. static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
  504. }
  505. }
  506. declare module 'babylonjs-materials/src/triPlanar/triPlanarMaterial' {
  507. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  508. import "./triplanar.fragment";
  509. import "./triplanar.vertex";
  510. export class TriPlanarMaterial extends PushMaterial {
  511. mixTexture: BaseTexture;
  512. diffuseTextureX: BaseTexture;
  513. diffuseTextureY: BaseTexture;
  514. diffuseTextureZ: BaseTexture;
  515. normalTextureX: BaseTexture;
  516. normalTextureY: BaseTexture;
  517. normalTextureZ: BaseTexture;
  518. tileSize: number;
  519. diffuseColor: Color3;
  520. specularColor: Color3;
  521. specularPower: number;
  522. disableLighting: boolean;
  523. maxSimultaneousLights: number;
  524. constructor(name: string, scene: Scene);
  525. needAlphaBlending(): boolean;
  526. needAlphaTesting(): boolean;
  527. getAlphaTestTexture(): Nullable<BaseTexture>;
  528. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  529. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  530. getAnimatables(): IAnimatable[];
  531. getActiveTextures(): BaseTexture[];
  532. hasTexture(texture: BaseTexture): boolean;
  533. dispose(forceDisposeEffect?: boolean): void;
  534. clone(name: string): TriPlanarMaterial;
  535. serialize(): any;
  536. getClassName(): string;
  537. static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
  538. }
  539. }
  540. declare module 'babylonjs-materials/src/water/waterMaterial' {
  541. import { PushMaterial, BaseTexture, Color3, Vector2, SmartArray, RenderTargetTexture, Nullable, AbstractMesh, Matrix, Scene, SubMesh, Mesh, IAnimatable } from "babylonjs";
  542. import "./water.fragment";
  543. import "./water.vertex";
  544. export class WaterMaterial extends PushMaterial {
  545. renderTargetSize: Vector2;
  546. bumpTexture: BaseTexture;
  547. diffuseColor: Color3;
  548. specularColor: Color3;
  549. specularPower: number;
  550. disableLighting: boolean;
  551. maxSimultaneousLights: number;
  552. /**
  553. * @param {number}: Represents the wind force
  554. */
  555. windForce: number;
  556. /**
  557. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  558. */
  559. windDirection: Vector2;
  560. /**
  561. * @param {number}: Wave height, represents the height of the waves
  562. */
  563. waveHeight: number;
  564. /**
  565. * @param {number}: Bump height, represents the bump height related to the bump map
  566. */
  567. bumpHeight: number;
  568. bumpSuperimpose: boolean;
  569. fresnelSeparate: boolean;
  570. bumpAffectsReflection: boolean;
  571. /**
  572. * @param {number}: The water color blended with the refraction (near)
  573. */
  574. waterColor: Color3;
  575. /**
  576. * @param {number}: The blend factor related to the water color
  577. */
  578. colorBlendFactor: number;
  579. /**
  580. * @param {number}: The water color blended with the reflection (far)
  581. */
  582. waterColor2: Color3;
  583. /**
  584. * @param {number}: The blend factor related to the water color (reflection, far)
  585. */
  586. colorBlendFactor2: number;
  587. /**
  588. * @param {number}: Represents the maximum length of a wave
  589. */
  590. waveLength: number;
  591. /**
  592. * @param {number}: Defines the waves speed
  593. */
  594. waveSpeed: number;
  595. protected _renderTargets: SmartArray<RenderTargetTexture>;
  596. /**
  597. * Gets a boolean indicating that current material needs to register RTT
  598. */
  599. readonly hasRenderTargetTextures: boolean;
  600. /**
  601. * Constructor
  602. */
  603. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  604. useLogarithmicDepth: boolean;
  605. readonly refractionTexture: Nullable<RenderTargetTexture>;
  606. readonly reflectionTexture: Nullable<RenderTargetTexture>;
  607. addToRenderList(node: any): void;
  608. enableRenderTargets(enable: boolean): void;
  609. getRenderList(): Nullable<AbstractMesh[]>;
  610. readonly renderTargetsEnabled: boolean;
  611. needAlphaBlending(): boolean;
  612. needAlphaTesting(): boolean;
  613. getAlphaTestTexture(): Nullable<BaseTexture>;
  614. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  615. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  616. getAnimatables(): IAnimatable[];
  617. getActiveTextures(): BaseTexture[];
  618. hasTexture(texture: BaseTexture): boolean;
  619. dispose(forceDisposeEffect?: boolean): void;
  620. clone(name: string): WaterMaterial;
  621. serialize(): any;
  622. getClassName(): string;
  623. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  624. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  625. }
  626. }
  627. /*BabylonJS Materials*/
  628. // Dependencies for this module:
  629. // ../../../../Tools/Gulp/babylonjs
  630. declare module BABYLON {
  631. export class CellMaterial extends BABYLON.PushMaterial {
  632. diffuseTexture: BABYLON.BaseTexture;
  633. diffuseColor: BABYLON.Color3;
  634. _computeHighLevel: boolean;
  635. computeHighLevel: boolean;
  636. disableLighting: boolean;
  637. maxSimultaneousLights: number;
  638. constructor(name: string, scene: BABYLON.Scene);
  639. needAlphaBlending(): boolean;
  640. needAlphaTesting(): boolean;
  641. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  642. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  643. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  644. getAnimatables(): BABYLON.IAnimatable[];
  645. getActiveTextures(): BABYLON.BaseTexture[];
  646. hasTexture(texture: BABYLON.BaseTexture): boolean;
  647. dispose(forceDisposeEffect?: boolean): void;
  648. getClassName(): string;
  649. clone(name: string): CellMaterial;
  650. serialize(): any;
  651. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): CellMaterial;
  652. }
  653. }
  654. declare module BABYLON {
  655. export class CustomShaderStructure {
  656. FragmentStore: string;
  657. VertexStore: string;
  658. constructor();
  659. }
  660. export class ShaderSpecialParts {
  661. constructor();
  662. Fragment_Begin: string;
  663. Fragment_Definitions: string;
  664. Fragment_MainBegin: string;
  665. Fragment_Custom_Diffuse: string;
  666. Fragment_Custom_Alpha: string;
  667. Fragment_Before_FragColor: string;
  668. Vertex_Begin: string;
  669. Vertex_Definitions: string;
  670. Vertex_MainBegin: string;
  671. Vertex_Before_PositionUpdated: string;
  672. Vertex_Before_NormalUpdated: string;
  673. }
  674. export class CustomMaterial extends BABYLON.StandardMaterial {
  675. static ShaderIndexer: number;
  676. CustomParts: ShaderSpecialParts;
  677. _isCreatedShader: boolean;
  678. _createdShaderName: string;
  679. _customUniform: string[];
  680. _newUniforms: string[];
  681. _newUniformInstances: any[];
  682. _newSamplerInstances: BABYLON.Texture[];
  683. FragmentShader: string;
  684. VertexShader: string;
  685. AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
  686. ReviewUniform(name: string, arr: string[]): string[];
  687. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.StandardMaterialDefines): string;
  688. constructor(name: string, scene: BABYLON.Scene);
  689. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  690. Fragment_Begin(shaderPart: string): CustomMaterial;
  691. Fragment_Definitions(shaderPart: string): CustomMaterial;
  692. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  693. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  694. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  695. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  696. Vertex_Begin(shaderPart: string): CustomMaterial;
  697. Vertex_Definitions(shaderPart: string): CustomMaterial;
  698. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  699. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  700. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  701. }
  702. }
  703. declare module BABYLON {
  704. export class FireMaterial extends BABYLON.PushMaterial {
  705. diffuseTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  706. distortionTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  707. opacityTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  708. diffuseColor: BABYLON.Color3;
  709. speed: number;
  710. constructor(name: string, scene: BABYLON.Scene);
  711. needAlphaBlending(): boolean;
  712. needAlphaTesting(): boolean;
  713. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  714. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  715. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  716. getAnimatables(): BABYLON.IAnimatable[];
  717. getActiveTextures(): BABYLON.BaseTexture[];
  718. hasTexture(texture: BABYLON.BaseTexture): boolean;
  719. getClassName(): string;
  720. dispose(forceDisposeEffect?: boolean): void;
  721. clone(name: string): FireMaterial;
  722. serialize(): any;
  723. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FireMaterial;
  724. }
  725. }
  726. declare module BABYLON {
  727. export class FurMaterial extends BABYLON.PushMaterial {
  728. diffuseTexture: BABYLON.BaseTexture;
  729. heightTexture: BABYLON.BaseTexture;
  730. diffuseColor: BABYLON.Color3;
  731. furLength: number;
  732. furAngle: number;
  733. furColor: BABYLON.Color3;
  734. furOffset: number;
  735. furSpacing: number;
  736. furGravity: BABYLON.Vector3;
  737. furSpeed: number;
  738. furDensity: number;
  739. furOcclusion: number;
  740. furTexture: BABYLON.DynamicTexture;
  741. disableLighting: boolean;
  742. maxSimultaneousLights: number;
  743. highLevelFur: boolean;
  744. _meshes: BABYLON.AbstractMesh[];
  745. constructor(name: string, scene: BABYLON.Scene);
  746. furTime: number;
  747. needAlphaBlending(): boolean;
  748. needAlphaTesting(): boolean;
  749. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  750. updateFur(): void;
  751. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  752. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  753. getAnimatables(): BABYLON.IAnimatable[];
  754. getActiveTextures(): BABYLON.BaseTexture[];
  755. hasTexture(texture: BABYLON.BaseTexture): boolean;
  756. dispose(forceDisposeEffect?: boolean): void;
  757. clone(name: string): FurMaterial;
  758. serialize(): any;
  759. getClassName(): string;
  760. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FurMaterial;
  761. static GenerateTexture(name: string, scene: BABYLON.Scene): BABYLON.DynamicTexture;
  762. static FurifyMesh(sourceMesh: BABYLON.Mesh, quality: number): BABYLON.Mesh[];
  763. }
  764. }
  765. declare module BABYLON {
  766. export class GradientMaterial extends BABYLON.PushMaterial {
  767. maxSimultaneousLights: number;
  768. topColor: BABYLON.Color3;
  769. topColorAlpha: number;
  770. bottomColor: BABYLON.Color3;
  771. bottomColorAlpha: number;
  772. offset: number;
  773. scale: number;
  774. smoothness: number;
  775. disableLighting: boolean;
  776. constructor(name: string, scene: BABYLON.Scene);
  777. needAlphaBlending(): boolean;
  778. needAlphaTesting(): boolean;
  779. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  780. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  781. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  782. getAnimatables(): BABYLON.IAnimatable[];
  783. dispose(forceDisposeEffect?: boolean): void;
  784. clone(name: string): GradientMaterial;
  785. serialize(): any;
  786. getClassName(): string;
  787. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GradientMaterial;
  788. }
  789. }
  790. declare module BABYLON {
  791. /**
  792. * The grid materials allows you to wrap any shape with a grid.
  793. * Colors are customizable.
  794. */
  795. export class GridMaterial extends BABYLON.PushMaterial {
  796. /**
  797. * Main color of the grid (e.g. between lines)
  798. */
  799. mainColor: BABYLON.Color3;
  800. /**
  801. * Color of the grid lines.
  802. */
  803. lineColor: BABYLON.Color3;
  804. /**
  805. * The scale of the grid compared to unit.
  806. */
  807. gridRatio: number;
  808. /**
  809. * Allows setting an offset for the grid lines.
  810. */
  811. gridOffset: BABYLON.Vector3;
  812. /**
  813. * The frequency of thicker lines.
  814. */
  815. majorUnitFrequency: number;
  816. /**
  817. * The visibility of minor units in the grid.
  818. */
  819. minorUnitVisibility: number;
  820. /**
  821. * The grid opacity outside of the lines.
  822. */
  823. opacity: number;
  824. /**
  825. * Determine RBG output is premultiplied by alpha value.
  826. */
  827. preMultiplyAlpha: boolean;
  828. /**
  829. * constructor
  830. * @param name The name given to the material in order to identify it afterwards.
  831. * @param scene The scene the material is used in.
  832. */
  833. constructor(name: string, scene: BABYLON.Scene);
  834. /**
  835. * Returns wehter or not the grid requires alpha blending.
  836. */
  837. needAlphaBlending(): boolean;
  838. needAlphaBlendingForMesh(mesh: BABYLON.AbstractMesh): boolean;
  839. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  840. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  841. /**
  842. * Dispose the material and its associated resources.
  843. * @param forceDisposeEffect will also dispose the used effect when true
  844. */
  845. dispose(forceDisposeEffect?: boolean): void;
  846. clone(name: string): GridMaterial;
  847. serialize(): any;
  848. getClassName(): string;
  849. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GridMaterial;
  850. }
  851. }
  852. declare module BABYLON {
  853. export class LavaMaterial extends BABYLON.PushMaterial {
  854. diffuseTexture: BABYLON.BaseTexture;
  855. noiseTexture: BABYLON.BaseTexture;
  856. fogColor: BABYLON.Color3;
  857. speed: number;
  858. movingSpeed: number;
  859. lowFrequencySpeed: number;
  860. fogDensity: number;
  861. diffuseColor: BABYLON.Color3;
  862. disableLighting: boolean;
  863. unlit: boolean;
  864. maxSimultaneousLights: number;
  865. constructor(name: string, scene: BABYLON.Scene);
  866. needAlphaBlending(): boolean;
  867. needAlphaTesting(): boolean;
  868. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  869. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  870. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  871. getAnimatables(): BABYLON.IAnimatable[];
  872. getActiveTextures(): BABYLON.BaseTexture[];
  873. hasTexture(texture: BABYLON.BaseTexture): boolean;
  874. dispose(forceDisposeEffect?: boolean): void;
  875. clone(name: string): LavaMaterial;
  876. serialize(): any;
  877. getClassName(): string;
  878. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): LavaMaterial;
  879. }
  880. }
  881. declare module BABYLON {
  882. export class MixMaterial extends BABYLON.PushMaterial {
  883. mixTexture1: BABYLON.BaseTexture;
  884. mixTexture2: BABYLON.BaseTexture;
  885. diffuseTexture1: BABYLON.Texture;
  886. diffuseTexture2: BABYLON.Texture;
  887. diffuseTexture3: BABYLON.Texture;
  888. diffuseTexture4: BABYLON.Texture;
  889. diffuseTexture5: BABYLON.Texture;
  890. diffuseTexture6: BABYLON.Texture;
  891. diffuseTexture7: BABYLON.Texture;
  892. diffuseTexture8: BABYLON.Texture;
  893. /**
  894. * Uniforms
  895. */
  896. diffuseColor: BABYLON.Color3;
  897. specularColor: BABYLON.Color3;
  898. specularPower: number;
  899. disableLighting: boolean;
  900. maxSimultaneousLights: number;
  901. constructor(name: string, scene: BABYLON.Scene);
  902. needAlphaBlending(): boolean;
  903. needAlphaTesting(): boolean;
  904. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  905. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  906. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  907. getAnimatables(): BABYLON.IAnimatable[];
  908. getActiveTextures(): BABYLON.BaseTexture[];
  909. hasTexture(texture: BABYLON.BaseTexture): boolean;
  910. dispose(forceDisposeEffect?: boolean): void;
  911. clone(name: string): MixMaterial;
  912. serialize(): any;
  913. getClassName(): string;
  914. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MixMaterial;
  915. }
  916. }
  917. declare module BABYLON {
  918. export class NormalMaterial extends BABYLON.PushMaterial {
  919. diffuseTexture: BABYLON.BaseTexture;
  920. diffuseColor: BABYLON.Color3;
  921. disableLighting: boolean;
  922. maxSimultaneousLights: number;
  923. constructor(name: string, scene: BABYLON.Scene);
  924. needAlphaBlending(): boolean;
  925. needAlphaTesting(): boolean;
  926. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  927. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  928. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  929. getAnimatables(): BABYLON.IAnimatable[];
  930. getActiveTextures(): BABYLON.BaseTexture[];
  931. hasTexture(texture: BABYLON.BaseTexture): boolean;
  932. dispose(forceDisposeEffect?: boolean): void;
  933. clone(name: string): NormalMaterial;
  934. serialize(): any;
  935. getClassName(): string;
  936. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): NormalMaterial;
  937. }
  938. }
  939. declare module BABYLON {
  940. export class ShadowOnlyMaterial extends BABYLON.PushMaterial {
  941. constructor(name: string, scene: BABYLON.Scene);
  942. shadowColor: BABYLON.Color3;
  943. needAlphaBlending(): boolean;
  944. needAlphaTesting(): boolean;
  945. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  946. activeLight: BABYLON.IShadowLight;
  947. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  948. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  949. clone(name: string): ShadowOnlyMaterial;
  950. serialize(): any;
  951. getClassName(): string;
  952. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): ShadowOnlyMaterial;
  953. }
  954. }
  955. declare module BABYLON {
  956. export class SimpleMaterial extends BABYLON.PushMaterial {
  957. diffuseTexture: BABYLON.BaseTexture;
  958. diffuseColor: BABYLON.Color3;
  959. disableLighting: boolean;
  960. maxSimultaneousLights: number;
  961. constructor(name: string, scene: BABYLON.Scene);
  962. needAlphaBlending(): boolean;
  963. needAlphaTesting(): boolean;
  964. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  965. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  966. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  967. getAnimatables(): BABYLON.IAnimatable[];
  968. getActiveTextures(): BABYLON.BaseTexture[];
  969. hasTexture(texture: BABYLON.BaseTexture): boolean;
  970. dispose(forceDisposeEffect?: boolean): void;
  971. clone(name: string): SimpleMaterial;
  972. serialize(): any;
  973. getClassName(): string;
  974. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SimpleMaterial;
  975. }
  976. }
  977. declare module BABYLON {
  978. export class SkyMaterial extends BABYLON.PushMaterial {
  979. luminance: number;
  980. turbidity: number;
  981. rayleigh: number;
  982. mieCoefficient: number;
  983. mieDirectionalG: number;
  984. distance: number;
  985. inclination: number;
  986. azimuth: number;
  987. sunPosition: BABYLON.Vector3;
  988. useSunPosition: boolean;
  989. constructor(name: string, scene: BABYLON.Scene);
  990. needAlphaBlending(): boolean;
  991. needAlphaTesting(): boolean;
  992. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  993. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  994. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  995. getAnimatables(): BABYLON.IAnimatable[];
  996. dispose(forceDisposeEffect?: boolean): void;
  997. clone(name: string): SkyMaterial;
  998. serialize(): any;
  999. getClassName(): string;
  1000. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SkyMaterial;
  1001. }
  1002. }
  1003. declare module BABYLON {
  1004. export class TerrainMaterial extends BABYLON.PushMaterial {
  1005. mixTexture: BABYLON.BaseTexture;
  1006. diffuseTexture1: BABYLON.Texture;
  1007. diffuseTexture2: BABYLON.Texture;
  1008. diffuseTexture3: BABYLON.Texture;
  1009. bumpTexture1: BABYLON.Texture;
  1010. bumpTexture2: BABYLON.Texture;
  1011. bumpTexture3: BABYLON.Texture;
  1012. diffuseColor: BABYLON.Color3;
  1013. specularColor: BABYLON.Color3;
  1014. specularPower: number;
  1015. disableLighting: boolean;
  1016. maxSimultaneousLights: number;
  1017. constructor(name: string, scene: BABYLON.Scene);
  1018. needAlphaBlending(): boolean;
  1019. needAlphaTesting(): boolean;
  1020. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1021. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1022. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1023. getAnimatables(): BABYLON.IAnimatable[];
  1024. getActiveTextures(): BABYLON.BaseTexture[];
  1025. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1026. dispose(forceDisposeEffect?: boolean): void;
  1027. clone(name: string): TerrainMaterial;
  1028. serialize(): any;
  1029. getClassName(): string;
  1030. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TerrainMaterial;
  1031. }
  1032. }
  1033. declare module BABYLON {
  1034. export class TriPlanarMaterial extends BABYLON.PushMaterial {
  1035. mixTexture: BABYLON.BaseTexture;
  1036. diffuseTextureX: BABYLON.BaseTexture;
  1037. diffuseTextureY: BABYLON.BaseTexture;
  1038. diffuseTextureZ: BABYLON.BaseTexture;
  1039. normalTextureX: BABYLON.BaseTexture;
  1040. normalTextureY: BABYLON.BaseTexture;
  1041. normalTextureZ: BABYLON.BaseTexture;
  1042. tileSize: number;
  1043. diffuseColor: BABYLON.Color3;
  1044. specularColor: BABYLON.Color3;
  1045. specularPower: number;
  1046. disableLighting: boolean;
  1047. maxSimultaneousLights: number;
  1048. constructor(name: string, scene: BABYLON.Scene);
  1049. needAlphaBlending(): boolean;
  1050. needAlphaTesting(): boolean;
  1051. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1052. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1053. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1054. getAnimatables(): BABYLON.IAnimatable[];
  1055. getActiveTextures(): BABYLON.BaseTexture[];
  1056. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1057. dispose(forceDisposeEffect?: boolean): void;
  1058. clone(name: string): TriPlanarMaterial;
  1059. serialize(): any;
  1060. getClassName(): string;
  1061. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TriPlanarMaterial;
  1062. }
  1063. }
  1064. declare module BABYLON {
  1065. export class WaterMaterial extends BABYLON.PushMaterial {
  1066. renderTargetSize: BABYLON.Vector2;
  1067. bumpTexture: BABYLON.BaseTexture;
  1068. diffuseColor: BABYLON.Color3;
  1069. specularColor: BABYLON.Color3;
  1070. specularPower: number;
  1071. disableLighting: boolean;
  1072. maxSimultaneousLights: number;
  1073. /**
  1074. * @param {number}: Represents the wind force
  1075. */
  1076. windForce: number;
  1077. /**
  1078. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  1079. */
  1080. windDirection: BABYLON.Vector2;
  1081. /**
  1082. * @param {number}: Wave height, represents the height of the waves
  1083. */
  1084. waveHeight: number;
  1085. /**
  1086. * @param {number}: Bump height, represents the bump height related to the bump map
  1087. */
  1088. bumpHeight: number;
  1089. bumpSuperimpose: boolean;
  1090. fresnelSeparate: boolean;
  1091. bumpAffectsReflection: boolean;
  1092. /**
  1093. * @param {number}: The water color blended with the refraction (near)
  1094. */
  1095. waterColor: BABYLON.Color3;
  1096. /**
  1097. * @param {number}: The blend factor related to the water color
  1098. */
  1099. colorBlendFactor: number;
  1100. /**
  1101. * @param {number}: The water color blended with the reflection (far)
  1102. */
  1103. waterColor2: BABYLON.Color3;
  1104. /**
  1105. * @param {number}: The blend factor related to the water color (reflection, far)
  1106. */
  1107. colorBlendFactor2: number;
  1108. /**
  1109. * @param {number}: Represents the maximum length of a wave
  1110. */
  1111. waveLength: number;
  1112. /**
  1113. * @param {number}: Defines the waves speed
  1114. */
  1115. waveSpeed: number;
  1116. protected _renderTargets: BABYLON.SmartArray<BABYLON.RenderTargetTexture>;
  1117. /**
  1118. * Gets a boolean indicating that current material needs to register RTT
  1119. */
  1120. readonly hasRenderTargetTextures: boolean;
  1121. /**
  1122. * Constructor
  1123. */
  1124. constructor(name: string, scene: BABYLON.Scene, renderTargetSize?: BABYLON.Vector2);
  1125. useLogarithmicDepth: boolean;
  1126. readonly refractionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  1127. readonly reflectionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  1128. addToRenderList(node: any): void;
  1129. enableRenderTargets(enable: boolean): void;
  1130. getRenderList(): BABYLON.Nullable<BABYLON.AbstractMesh[]>;
  1131. readonly renderTargetsEnabled: boolean;
  1132. needAlphaBlending(): boolean;
  1133. needAlphaTesting(): boolean;
  1134. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1135. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1136. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1137. getAnimatables(): BABYLON.IAnimatable[];
  1138. getActiveTextures(): BABYLON.BaseTexture[];
  1139. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1140. dispose(forceDisposeEffect?: boolean): void;
  1141. clone(name: string): WaterMaterial;
  1142. serialize(): any;
  1143. getClassName(): string;
  1144. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): WaterMaterial;
  1145. static CreateDefaultMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
  1146. }
  1147. }