babylonjs.materials.module.d.ts 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152
  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. /**
  284. * Dispose the material and its associated resources.
  285. * @param forceDisposeEffect will also dispose the used effect when true
  286. */
  287. dispose(forceDisposeEffect?: boolean): void;
  288. clone(name: string): GridMaterial;
  289. serialize(): any;
  290. getClassName(): string;
  291. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  292. }
  293. }
  294. declare module 'babylonjs-materials/src/lava/lavaMaterial' {
  295. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  296. export class LavaMaterial extends PushMaterial {
  297. diffuseTexture: BaseTexture;
  298. noiseTexture: BaseTexture;
  299. fogColor: Color3;
  300. speed: number;
  301. movingSpeed: number;
  302. lowFrequencySpeed: number;
  303. fogDensity: number;
  304. diffuseColor: Color3;
  305. disableLighting: boolean;
  306. unlit: boolean;
  307. maxSimultaneousLights: number;
  308. constructor(name: string, scene: Scene);
  309. needAlphaBlending(): boolean;
  310. needAlphaTesting(): boolean;
  311. getAlphaTestTexture(): Nullable<BaseTexture>;
  312. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  313. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  314. getAnimatables(): IAnimatable[];
  315. getActiveTextures(): BaseTexture[];
  316. hasTexture(texture: BaseTexture): boolean;
  317. dispose(forceDisposeEffect?: boolean): void;
  318. clone(name: string): LavaMaterial;
  319. serialize(): any;
  320. getClassName(): string;
  321. static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
  322. }
  323. }
  324. declare module 'babylonjs-materials/src/mix/mixMaterial' {
  325. import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  326. export class MixMaterial extends PushMaterial {
  327. mixTexture1: BaseTexture;
  328. mixTexture2: BaseTexture;
  329. diffuseTexture1: Texture;
  330. diffuseTexture2: Texture;
  331. diffuseTexture3: Texture;
  332. diffuseTexture4: Texture;
  333. diffuseTexture5: Texture;
  334. diffuseTexture6: Texture;
  335. diffuseTexture7: Texture;
  336. diffuseTexture8: Texture;
  337. /**
  338. * Uniforms
  339. */
  340. diffuseColor: Color3;
  341. specularColor: Color3;
  342. specularPower: number;
  343. disableLighting: boolean;
  344. maxSimultaneousLights: number;
  345. constructor(name: string, scene: Scene);
  346. needAlphaBlending(): boolean;
  347. needAlphaTesting(): boolean;
  348. getAlphaTestTexture(): Nullable<BaseTexture>;
  349. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  350. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  351. getAnimatables(): IAnimatable[];
  352. getActiveTextures(): BaseTexture[];
  353. hasTexture(texture: BaseTexture): boolean;
  354. dispose(forceDisposeEffect?: boolean): void;
  355. clone(name: string): MixMaterial;
  356. serialize(): any;
  357. getClassName(): string;
  358. static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
  359. }
  360. }
  361. declare module 'babylonjs-materials/src/normal/normalMaterial' {
  362. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  363. export class NormalMaterial extends PushMaterial {
  364. diffuseTexture: BaseTexture;
  365. diffuseColor: Color3;
  366. disableLighting: boolean;
  367. maxSimultaneousLights: number;
  368. constructor(name: string, scene: Scene);
  369. needAlphaBlending(): boolean;
  370. needAlphaTesting(): boolean;
  371. getAlphaTestTexture(): Nullable<BaseTexture>;
  372. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  373. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  374. getAnimatables(): IAnimatable[];
  375. getActiveTextures(): BaseTexture[];
  376. hasTexture(texture: BaseTexture): boolean;
  377. dispose(forceDisposeEffect?: boolean): void;
  378. clone(name: string): NormalMaterial;
  379. serialize(): any;
  380. getClassName(): string;
  381. static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
  382. }
  383. }
  384. declare module 'babylonjs-materials/src/shadowOnly/shadowOnlyMaterial' {
  385. import { PushMaterial, IShadowLight, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh } from "babylonjs";
  386. export class ShadowOnlyMaterial extends PushMaterial {
  387. constructor(name: string, scene: Scene);
  388. shadowColor: BABYLON.Color3;
  389. needAlphaBlending(): boolean;
  390. needAlphaTesting(): boolean;
  391. getAlphaTestTexture(): Nullable<BaseTexture>;
  392. activeLight: IShadowLight;
  393. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  394. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  395. clone(name: string): ShadowOnlyMaterial;
  396. serialize(): any;
  397. getClassName(): string;
  398. static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
  399. }
  400. }
  401. declare module 'babylonjs-materials/src/simple/simpleMaterial' {
  402. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  403. export class SimpleMaterial extends PushMaterial {
  404. diffuseTexture: BaseTexture;
  405. diffuseColor: Color3;
  406. disableLighting: boolean;
  407. maxSimultaneousLights: number;
  408. constructor(name: string, scene: Scene);
  409. needAlphaBlending(): boolean;
  410. needAlphaTesting(): boolean;
  411. getAlphaTestTexture(): Nullable<BaseTexture>;
  412. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  413. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  414. getAnimatables(): IAnimatable[];
  415. getActiveTextures(): BaseTexture[];
  416. hasTexture(texture: BaseTexture): boolean;
  417. dispose(forceDisposeEffect?: boolean): void;
  418. clone(name: string): SimpleMaterial;
  419. serialize(): any;
  420. getClassName(): string;
  421. static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
  422. }
  423. }
  424. declare module 'babylonjs-materials/src/sky/skyMaterial' {
  425. import { PushMaterial, Vector3, Scene, Nullable, BaseTexture, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  426. export class SkyMaterial extends PushMaterial {
  427. luminance: number;
  428. turbidity: number;
  429. rayleigh: number;
  430. mieCoefficient: number;
  431. mieDirectionalG: number;
  432. distance: number;
  433. inclination: number;
  434. azimuth: number;
  435. sunPosition: Vector3;
  436. useSunPosition: boolean;
  437. constructor(name: string, scene: Scene);
  438. needAlphaBlending(): boolean;
  439. needAlphaTesting(): boolean;
  440. getAlphaTestTexture(): Nullable<BaseTexture>;
  441. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  442. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  443. getAnimatables(): IAnimatable[];
  444. dispose(forceDisposeEffect?: boolean): void;
  445. clone(name: string): SkyMaterial;
  446. serialize(): any;
  447. getClassName(): string;
  448. static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
  449. }
  450. }
  451. declare module 'babylonjs-materials/src/terrain/terrainMaterial' {
  452. import { PushMaterial, BaseTexture, Texture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  453. export class TerrainMaterial extends PushMaterial {
  454. mixTexture: BaseTexture;
  455. diffuseTexture1: Texture;
  456. diffuseTexture2: Texture;
  457. diffuseTexture3: Texture;
  458. bumpTexture1: Texture;
  459. bumpTexture2: Texture;
  460. bumpTexture3: Texture;
  461. diffuseColor: Color3;
  462. specularColor: Color3;
  463. specularPower: number;
  464. disableLighting: boolean;
  465. maxSimultaneousLights: number;
  466. constructor(name: string, scene: Scene);
  467. needAlphaBlending(): boolean;
  468. needAlphaTesting(): boolean;
  469. getAlphaTestTexture(): Nullable<BaseTexture>;
  470. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  471. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  472. getAnimatables(): IAnimatable[];
  473. getActiveTextures(): BaseTexture[];
  474. hasTexture(texture: BaseTexture): boolean;
  475. dispose(forceDisposeEffect?: boolean): void;
  476. clone(name: string): TerrainMaterial;
  477. serialize(): any;
  478. getClassName(): string;
  479. static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
  480. }
  481. }
  482. declare module 'babylonjs-materials/src/triPlanar/triPlanarMaterial' {
  483. import { PushMaterial, BaseTexture, Color3, Scene, Nullable, AbstractMesh, SubMesh, Matrix, Mesh, IAnimatable } from "babylonjs";
  484. export class TriPlanarMaterial extends PushMaterial {
  485. mixTexture: BaseTexture;
  486. diffuseTextureX: BaseTexture;
  487. diffuseTextureY: BaseTexture;
  488. diffuseTextureZ: BaseTexture;
  489. normalTextureX: BaseTexture;
  490. normalTextureY: BaseTexture;
  491. normalTextureZ: BaseTexture;
  492. tileSize: number;
  493. diffuseColor: Color3;
  494. specularColor: Color3;
  495. specularPower: number;
  496. disableLighting: boolean;
  497. maxSimultaneousLights: number;
  498. constructor(name: string, scene: Scene);
  499. needAlphaBlending(): boolean;
  500. needAlphaTesting(): boolean;
  501. getAlphaTestTexture(): Nullable<BaseTexture>;
  502. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  503. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  504. getAnimatables(): IAnimatable[];
  505. getActiveTextures(): BaseTexture[];
  506. hasTexture(texture: BaseTexture): boolean;
  507. dispose(forceDisposeEffect?: boolean): void;
  508. clone(name: string): TriPlanarMaterial;
  509. serialize(): any;
  510. getClassName(): string;
  511. static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
  512. }
  513. }
  514. declare module 'babylonjs-materials/src/water/waterMaterial' {
  515. import { PushMaterial, BaseTexture, Color3, Vector2, SmartArray, RenderTargetTexture, Nullable, AbstractMesh, Matrix, Scene, SubMesh, Mesh, IAnimatable } from "babylonjs";
  516. export class WaterMaterial extends PushMaterial {
  517. renderTargetSize: Vector2;
  518. bumpTexture: BaseTexture;
  519. diffuseColor: Color3;
  520. specularColor: Color3;
  521. specularPower: number;
  522. disableLighting: boolean;
  523. maxSimultaneousLights: number;
  524. /**
  525. * @param {number}: Represents the wind force
  526. */
  527. windForce: number;
  528. /**
  529. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  530. */
  531. windDirection: Vector2;
  532. /**
  533. * @param {number}: Wave height, represents the height of the waves
  534. */
  535. waveHeight: number;
  536. /**
  537. * @param {number}: Bump height, represents the bump height related to the bump map
  538. */
  539. bumpHeight: number;
  540. bumpSuperimpose: boolean;
  541. fresnelSeparate: boolean;
  542. bumpAffectsReflection: boolean;
  543. /**
  544. * @param {number}: The water color blended with the refraction (near)
  545. */
  546. waterColor: Color3;
  547. /**
  548. * @param {number}: The blend factor related to the water color
  549. */
  550. colorBlendFactor: number;
  551. /**
  552. * @param {number}: The water color blended with the reflection (far)
  553. */
  554. waterColor2: Color3;
  555. /**
  556. * @param {number}: The blend factor related to the water color (reflection, far)
  557. */
  558. colorBlendFactor2: number;
  559. /**
  560. * @param {number}: Represents the maximum length of a wave
  561. */
  562. waveLength: number;
  563. /**
  564. * @param {number}: Defines the waves speed
  565. */
  566. waveSpeed: number;
  567. protected _renderTargets: SmartArray<RenderTargetTexture>;
  568. /**
  569. * Gets a boolean indicating that current material needs to register RTT
  570. */
  571. readonly hasRenderTargetTextures: boolean;
  572. /**
  573. * Constructor
  574. */
  575. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  576. useLogarithmicDepth: boolean;
  577. readonly refractionTexture: Nullable<RenderTargetTexture>;
  578. readonly reflectionTexture: Nullable<RenderTargetTexture>;
  579. addToRenderList(node: any): void;
  580. enableRenderTargets(enable: boolean): void;
  581. getRenderList(): Nullable<AbstractMesh[]>;
  582. readonly renderTargetsEnabled: boolean;
  583. needAlphaBlending(): boolean;
  584. needAlphaTesting(): boolean;
  585. getAlphaTestTexture(): Nullable<BaseTexture>;
  586. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  587. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  588. getAnimatables(): IAnimatable[];
  589. getActiveTextures(): BaseTexture[];
  590. hasTexture(texture: BaseTexture): boolean;
  591. dispose(forceDisposeEffect?: boolean): void;
  592. clone(name: string): WaterMaterial;
  593. serialize(): any;
  594. getClassName(): string;
  595. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  596. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  597. }
  598. }
  599. /*BabylonJS Materials*/
  600. // Dependencies for this module:
  601. // ../../../../Tools/Gulp/babylonjs
  602. declare module BABYLON {
  603. export class CellMaterial extends BABYLON.PushMaterial {
  604. diffuseTexture: BABYLON.BaseTexture;
  605. diffuseColor: BABYLON.Color3;
  606. _computeHighLevel: boolean;
  607. computeHighLevel: boolean;
  608. disableLighting: boolean;
  609. maxSimultaneousLights: number;
  610. constructor(name: string, scene: BABYLON.Scene);
  611. needAlphaBlending(): boolean;
  612. needAlphaTesting(): boolean;
  613. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  614. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  615. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  616. getAnimatables(): BABYLON.IAnimatable[];
  617. getActiveTextures(): BABYLON.BaseTexture[];
  618. hasTexture(texture: BABYLON.BaseTexture): boolean;
  619. dispose(forceDisposeEffect?: boolean): void;
  620. getClassName(): string;
  621. clone(name: string): CellMaterial;
  622. serialize(): any;
  623. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): CellMaterial;
  624. }
  625. }
  626. declare module BABYLON {
  627. export class CustomShaderStructure {
  628. FragmentStore: string;
  629. VertexStore: string;
  630. constructor();
  631. }
  632. export class ShaderSpecialParts {
  633. constructor();
  634. Fragment_Begin: string;
  635. Fragment_Definitions: string;
  636. Fragment_MainBegin: string;
  637. Fragment_Custom_Diffuse: string;
  638. Fragment_Custom_Alpha: string;
  639. Fragment_Before_FragColor: string;
  640. Vertex_Begin: string;
  641. Vertex_Definitions: string;
  642. Vertex_MainBegin: string;
  643. Vertex_Before_PositionUpdated: string;
  644. Vertex_Before_NormalUpdated: string;
  645. }
  646. export class CustomMaterial extends BABYLON.StandardMaterial {
  647. static ShaderIndexer: number;
  648. CustomParts: ShaderSpecialParts;
  649. _isCreatedShader: boolean;
  650. _createdShaderName: string;
  651. _customUniform: string[];
  652. _newUniforms: string[];
  653. _newUniformInstances: any[];
  654. _newSamplerInstances: BABYLON.Texture[];
  655. FragmentShader: string;
  656. VertexShader: string;
  657. AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
  658. ReviewUniform(name: string, arr: string[]): string[];
  659. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.StandardMaterialDefines): string;
  660. constructor(name: string, scene: BABYLON.Scene);
  661. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  662. Fragment_Begin(shaderPart: string): CustomMaterial;
  663. Fragment_Definitions(shaderPart: string): CustomMaterial;
  664. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  665. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  666. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  667. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  668. Vertex_Begin(shaderPart: string): CustomMaterial;
  669. Vertex_Definitions(shaderPart: string): CustomMaterial;
  670. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  671. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  672. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  673. }
  674. }
  675. declare module BABYLON {
  676. export class FireMaterial extends BABYLON.PushMaterial {
  677. diffuseTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  678. distortionTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  679. opacityTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  680. diffuseColor: BABYLON.Color3;
  681. speed: number;
  682. constructor(name: string, scene: BABYLON.Scene);
  683. needAlphaBlending(): boolean;
  684. needAlphaTesting(): boolean;
  685. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  686. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  687. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  688. getAnimatables(): BABYLON.IAnimatable[];
  689. getActiveTextures(): BABYLON.BaseTexture[];
  690. hasTexture(texture: BABYLON.BaseTexture): boolean;
  691. getClassName(): string;
  692. dispose(forceDisposeEffect?: boolean): void;
  693. clone(name: string): FireMaterial;
  694. serialize(): any;
  695. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FireMaterial;
  696. }
  697. }
  698. declare module BABYLON {
  699. export class FurMaterial extends BABYLON.PushMaterial {
  700. diffuseTexture: BABYLON.BaseTexture;
  701. heightTexture: BABYLON.BaseTexture;
  702. diffuseColor: BABYLON.Color3;
  703. furLength: number;
  704. furAngle: number;
  705. furColor: BABYLON.Color3;
  706. furOffset: number;
  707. furSpacing: number;
  708. furGravity: BABYLON.Vector3;
  709. furSpeed: number;
  710. furDensity: number;
  711. furOcclusion: number;
  712. furTexture: BABYLON.DynamicTexture;
  713. disableLighting: boolean;
  714. maxSimultaneousLights: number;
  715. highLevelFur: boolean;
  716. _meshes: BABYLON.AbstractMesh[];
  717. constructor(name: string, scene: BABYLON.Scene);
  718. furTime: number;
  719. needAlphaBlending(): boolean;
  720. needAlphaTesting(): boolean;
  721. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  722. updateFur(): void;
  723. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  724. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  725. getAnimatables(): BABYLON.IAnimatable[];
  726. getActiveTextures(): BABYLON.BaseTexture[];
  727. hasTexture(texture: BABYLON.BaseTexture): boolean;
  728. dispose(forceDisposeEffect?: boolean): void;
  729. clone(name: string): FurMaterial;
  730. serialize(): any;
  731. getClassName(): string;
  732. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FurMaterial;
  733. static GenerateTexture(name: string, scene: BABYLON.Scene): BABYLON.DynamicTexture;
  734. static FurifyMesh(sourceMesh: BABYLON.Mesh, quality: number): BABYLON.Mesh[];
  735. }
  736. }
  737. declare module BABYLON {
  738. export class GradientMaterial extends BABYLON.PushMaterial {
  739. maxSimultaneousLights: number;
  740. topColor: BABYLON.Color3;
  741. topColorAlpha: number;
  742. bottomColor: BABYLON.Color3;
  743. bottomColorAlpha: number;
  744. offset: number;
  745. scale: number;
  746. smoothness: number;
  747. disableLighting: boolean;
  748. constructor(name: string, scene: BABYLON.Scene);
  749. needAlphaBlending(): boolean;
  750. needAlphaTesting(): boolean;
  751. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  752. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  753. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  754. getAnimatables(): BABYLON.IAnimatable[];
  755. dispose(forceDisposeEffect?: boolean): void;
  756. clone(name: string): GradientMaterial;
  757. serialize(): any;
  758. getClassName(): string;
  759. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GradientMaterial;
  760. }
  761. }
  762. declare module BABYLON {
  763. /**
  764. * The grid materials allows you to wrap any shape with a grid.
  765. * Colors are customizable.
  766. */
  767. export class GridMaterial extends BABYLON.PushMaterial {
  768. /**
  769. * Main color of the grid (e.g. between lines)
  770. */
  771. mainColor: BABYLON.Color3;
  772. /**
  773. * Color of the grid lines.
  774. */
  775. lineColor: BABYLON.Color3;
  776. /**
  777. * The scale of the grid compared to unit.
  778. */
  779. gridRatio: number;
  780. /**
  781. * Allows setting an offset for the grid lines.
  782. */
  783. gridOffset: BABYLON.Vector3;
  784. /**
  785. * The frequency of thicker lines.
  786. */
  787. majorUnitFrequency: number;
  788. /**
  789. * The visibility of minor units in the grid.
  790. */
  791. minorUnitVisibility: number;
  792. /**
  793. * The grid opacity outside of the lines.
  794. */
  795. opacity: number;
  796. /**
  797. * Determine RBG output is premultiplied by alpha value.
  798. */
  799. preMultiplyAlpha: boolean;
  800. /**
  801. * constructor
  802. * @param name The name given to the material in order to identify it afterwards.
  803. * @param scene The scene the material is used in.
  804. */
  805. constructor(name: string, scene: BABYLON.Scene);
  806. /**
  807. * Returns wehter or not the grid requires alpha blending.
  808. */
  809. needAlphaBlending(): boolean;
  810. needAlphaBlendingForMesh(mesh: BABYLON.AbstractMesh): boolean;
  811. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  812. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  813. /**
  814. * Dispose the material and its associated resources.
  815. * @param forceDisposeEffect will also dispose the used effect when true
  816. */
  817. dispose(forceDisposeEffect?: boolean): void;
  818. clone(name: string): GridMaterial;
  819. serialize(): any;
  820. getClassName(): string;
  821. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GridMaterial;
  822. }
  823. }
  824. declare module BABYLON {
  825. export class LavaMaterial extends BABYLON.PushMaterial {
  826. diffuseTexture: BABYLON.BaseTexture;
  827. noiseTexture: BABYLON.BaseTexture;
  828. fogColor: BABYLON.Color3;
  829. speed: number;
  830. movingSpeed: number;
  831. lowFrequencySpeed: number;
  832. fogDensity: number;
  833. diffuseColor: BABYLON.Color3;
  834. disableLighting: boolean;
  835. unlit: boolean;
  836. maxSimultaneousLights: number;
  837. constructor(name: string, scene: BABYLON.Scene);
  838. needAlphaBlending(): boolean;
  839. needAlphaTesting(): boolean;
  840. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  841. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  842. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  843. getAnimatables(): BABYLON.IAnimatable[];
  844. getActiveTextures(): BABYLON.BaseTexture[];
  845. hasTexture(texture: BABYLON.BaseTexture): boolean;
  846. dispose(forceDisposeEffect?: boolean): void;
  847. clone(name: string): LavaMaterial;
  848. serialize(): any;
  849. getClassName(): string;
  850. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): LavaMaterial;
  851. }
  852. }
  853. declare module BABYLON {
  854. export class MixMaterial extends BABYLON.PushMaterial {
  855. mixTexture1: BABYLON.BaseTexture;
  856. mixTexture2: BABYLON.BaseTexture;
  857. diffuseTexture1: BABYLON.Texture;
  858. diffuseTexture2: BABYLON.Texture;
  859. diffuseTexture3: BABYLON.Texture;
  860. diffuseTexture4: BABYLON.Texture;
  861. diffuseTexture5: BABYLON.Texture;
  862. diffuseTexture6: BABYLON.Texture;
  863. diffuseTexture7: BABYLON.Texture;
  864. diffuseTexture8: BABYLON.Texture;
  865. /**
  866. * Uniforms
  867. */
  868. diffuseColor: BABYLON.Color3;
  869. specularColor: BABYLON.Color3;
  870. specularPower: number;
  871. disableLighting: boolean;
  872. maxSimultaneousLights: number;
  873. constructor(name: string, scene: BABYLON.Scene);
  874. needAlphaBlending(): boolean;
  875. needAlphaTesting(): boolean;
  876. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  877. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  878. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  879. getAnimatables(): BABYLON.IAnimatable[];
  880. getActiveTextures(): BABYLON.BaseTexture[];
  881. hasTexture(texture: BABYLON.BaseTexture): boolean;
  882. dispose(forceDisposeEffect?: boolean): void;
  883. clone(name: string): MixMaterial;
  884. serialize(): any;
  885. getClassName(): string;
  886. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MixMaterial;
  887. }
  888. }
  889. declare module BABYLON {
  890. export class NormalMaterial extends BABYLON.PushMaterial {
  891. diffuseTexture: BABYLON.BaseTexture;
  892. diffuseColor: BABYLON.Color3;
  893. disableLighting: boolean;
  894. maxSimultaneousLights: number;
  895. constructor(name: string, scene: BABYLON.Scene);
  896. needAlphaBlending(): boolean;
  897. needAlphaTesting(): boolean;
  898. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  899. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  900. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  901. getAnimatables(): BABYLON.IAnimatable[];
  902. getActiveTextures(): BABYLON.BaseTexture[];
  903. hasTexture(texture: BABYLON.BaseTexture): boolean;
  904. dispose(forceDisposeEffect?: boolean): void;
  905. clone(name: string): NormalMaterial;
  906. serialize(): any;
  907. getClassName(): string;
  908. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): NormalMaterial;
  909. }
  910. }
  911. declare module BABYLON {
  912. export class ShadowOnlyMaterial extends BABYLON.PushMaterial {
  913. constructor(name: string, scene: BABYLON.Scene);
  914. shadowColor: BABYLON.Color3;
  915. needAlphaBlending(): boolean;
  916. needAlphaTesting(): boolean;
  917. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  918. activeLight: BABYLON.IShadowLight;
  919. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  920. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  921. clone(name: string): ShadowOnlyMaterial;
  922. serialize(): any;
  923. getClassName(): string;
  924. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): ShadowOnlyMaterial;
  925. }
  926. }
  927. declare module BABYLON {
  928. export class SimpleMaterial extends BABYLON.PushMaterial {
  929. diffuseTexture: BABYLON.BaseTexture;
  930. diffuseColor: BABYLON.Color3;
  931. disableLighting: boolean;
  932. maxSimultaneousLights: number;
  933. constructor(name: string, scene: BABYLON.Scene);
  934. needAlphaBlending(): boolean;
  935. needAlphaTesting(): boolean;
  936. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  937. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  938. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  939. getAnimatables(): BABYLON.IAnimatable[];
  940. getActiveTextures(): BABYLON.BaseTexture[];
  941. hasTexture(texture: BABYLON.BaseTexture): boolean;
  942. dispose(forceDisposeEffect?: boolean): void;
  943. clone(name: string): SimpleMaterial;
  944. serialize(): any;
  945. getClassName(): string;
  946. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SimpleMaterial;
  947. }
  948. }
  949. declare module BABYLON {
  950. export class SkyMaterial extends BABYLON.PushMaterial {
  951. luminance: number;
  952. turbidity: number;
  953. rayleigh: number;
  954. mieCoefficient: number;
  955. mieDirectionalG: number;
  956. distance: number;
  957. inclination: number;
  958. azimuth: number;
  959. sunPosition: BABYLON.Vector3;
  960. useSunPosition: boolean;
  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. dispose(forceDisposeEffect?: boolean): void;
  969. clone(name: string): SkyMaterial;
  970. serialize(): any;
  971. getClassName(): string;
  972. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SkyMaterial;
  973. }
  974. }
  975. declare module BABYLON {
  976. export class TerrainMaterial extends BABYLON.PushMaterial {
  977. mixTexture: BABYLON.BaseTexture;
  978. diffuseTexture1: BABYLON.Texture;
  979. diffuseTexture2: BABYLON.Texture;
  980. diffuseTexture3: BABYLON.Texture;
  981. bumpTexture1: BABYLON.Texture;
  982. bumpTexture2: BABYLON.Texture;
  983. bumpTexture3: BABYLON.Texture;
  984. diffuseColor: BABYLON.Color3;
  985. specularColor: BABYLON.Color3;
  986. specularPower: number;
  987. disableLighting: boolean;
  988. maxSimultaneousLights: number;
  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. getActiveTextures(): BABYLON.BaseTexture[];
  997. hasTexture(texture: BABYLON.BaseTexture): boolean;
  998. dispose(forceDisposeEffect?: boolean): void;
  999. clone(name: string): TerrainMaterial;
  1000. serialize(): any;
  1001. getClassName(): string;
  1002. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TerrainMaterial;
  1003. }
  1004. }
  1005. declare module BABYLON {
  1006. export class TriPlanarMaterial extends BABYLON.PushMaterial {
  1007. mixTexture: BABYLON.BaseTexture;
  1008. diffuseTextureX: BABYLON.BaseTexture;
  1009. diffuseTextureY: BABYLON.BaseTexture;
  1010. diffuseTextureZ: BABYLON.BaseTexture;
  1011. normalTextureX: BABYLON.BaseTexture;
  1012. normalTextureY: BABYLON.BaseTexture;
  1013. normalTextureZ: BABYLON.BaseTexture;
  1014. tileSize: number;
  1015. diffuseColor: BABYLON.Color3;
  1016. specularColor: BABYLON.Color3;
  1017. specularPower: number;
  1018. disableLighting: boolean;
  1019. maxSimultaneousLights: number;
  1020. constructor(name: string, scene: BABYLON.Scene);
  1021. needAlphaBlending(): boolean;
  1022. needAlphaTesting(): boolean;
  1023. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1024. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1025. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1026. getAnimatables(): BABYLON.IAnimatable[];
  1027. getActiveTextures(): BABYLON.BaseTexture[];
  1028. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1029. dispose(forceDisposeEffect?: boolean): void;
  1030. clone(name: string): TriPlanarMaterial;
  1031. serialize(): any;
  1032. getClassName(): string;
  1033. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TriPlanarMaterial;
  1034. }
  1035. }
  1036. declare module BABYLON {
  1037. export class WaterMaterial extends BABYLON.PushMaterial {
  1038. renderTargetSize: BABYLON.Vector2;
  1039. bumpTexture: BABYLON.BaseTexture;
  1040. diffuseColor: BABYLON.Color3;
  1041. specularColor: BABYLON.Color3;
  1042. specularPower: number;
  1043. disableLighting: boolean;
  1044. maxSimultaneousLights: number;
  1045. /**
  1046. * @param {number}: Represents the wind force
  1047. */
  1048. windForce: number;
  1049. /**
  1050. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  1051. */
  1052. windDirection: BABYLON.Vector2;
  1053. /**
  1054. * @param {number}: Wave height, represents the height of the waves
  1055. */
  1056. waveHeight: number;
  1057. /**
  1058. * @param {number}: Bump height, represents the bump height related to the bump map
  1059. */
  1060. bumpHeight: number;
  1061. bumpSuperimpose: boolean;
  1062. fresnelSeparate: boolean;
  1063. bumpAffectsReflection: boolean;
  1064. /**
  1065. * @param {number}: The water color blended with the refraction (near)
  1066. */
  1067. waterColor: BABYLON.Color3;
  1068. /**
  1069. * @param {number}: The blend factor related to the water color
  1070. */
  1071. colorBlendFactor: number;
  1072. /**
  1073. * @param {number}: The water color blended with the reflection (far)
  1074. */
  1075. waterColor2: BABYLON.Color3;
  1076. /**
  1077. * @param {number}: The blend factor related to the water color (reflection, far)
  1078. */
  1079. colorBlendFactor2: number;
  1080. /**
  1081. * @param {number}: Represents the maximum length of a wave
  1082. */
  1083. waveLength: number;
  1084. /**
  1085. * @param {number}: Defines the waves speed
  1086. */
  1087. waveSpeed: number;
  1088. protected _renderTargets: BABYLON.SmartArray<BABYLON.RenderTargetTexture>;
  1089. /**
  1090. * Gets a boolean indicating that current material needs to register RTT
  1091. */
  1092. readonly hasRenderTargetTextures: boolean;
  1093. /**
  1094. * Constructor
  1095. */
  1096. constructor(name: string, scene: BABYLON.Scene, renderTargetSize?: BABYLON.Vector2);
  1097. useLogarithmicDepth: boolean;
  1098. readonly refractionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  1099. readonly reflectionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  1100. addToRenderList(node: any): void;
  1101. enableRenderTargets(enable: boolean): void;
  1102. getRenderList(): BABYLON.Nullable<BABYLON.AbstractMesh[]>;
  1103. readonly renderTargetsEnabled: boolean;
  1104. needAlphaBlending(): boolean;
  1105. needAlphaTesting(): boolean;
  1106. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1107. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1108. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1109. getAnimatables(): BABYLON.IAnimatable[];
  1110. getActiveTextures(): BABYLON.BaseTexture[];
  1111. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1112. dispose(forceDisposeEffect?: boolean): void;
  1113. clone(name: string): WaterMaterial;
  1114. serialize(): any;
  1115. getClassName(): string;
  1116. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): WaterMaterial;
  1117. static CreateDefaultMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
  1118. }
  1119. }