babylonjs.materials.d.ts 23 KB

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