babylonjs.materials.module.d.ts 23 KB

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