babylonjs.materials.module.d.ts 23 KB

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