babylonjs.materials.d.ts 23 KB

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