babylon.materials.module.d.ts 50 KB

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