babylon.gridMaterial.d.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /// <reference path="../../../dist/preview release/babylon.d.ts" />
  2. declare module BABYLON {
  3. /**
  4. * The grid materials allows you to wrap any shape with a grid.
  5. * Colors are customizable.
  6. */
  7. class GridMaterial extends BABYLON.Material {
  8. /**
  9. * Main color of the grid (e.g. between lines)
  10. */
  11. mainColor: Color3;
  12. /**
  13. * Color of the grid lines.
  14. */
  15. lineColor: Color3;
  16. /**
  17. * The scale of the grid compared to unit.
  18. */
  19. gridRatio: number;
  20. /**
  21. * The frequency of thicker lines.
  22. */
  23. majorUnitFrequency: number;
  24. /**
  25. * The visibility of minor units in the grid.
  26. */
  27. minorUnitVisibility: number;
  28. /**
  29. * The grid opacity outside of the lines.
  30. */
  31. opacity: number;
  32. private _gridControl;
  33. private _renderId;
  34. private _defines;
  35. private _cachedDefines;
  36. /**
  37. * constructor
  38. * @param name The name given to the material in order to identify it afterwards.
  39. * @param scene The scene the material is used in.
  40. */
  41. constructor(name: string, scene: Scene);
  42. /**
  43. * Returns wehter or not the grid requires alpha blending.
  44. */
  45. needAlphaBlending(): boolean;
  46. private _checkCache(scene, mesh?, useInstances?);
  47. isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
  48. bindOnlyWorldMatrix(world: Matrix): void;
  49. bind(world: Matrix, mesh?: Mesh): void;
  50. dispose(forceDisposeEffect?: boolean): void;
  51. clone(name: string): GridMaterial;
  52. serialize(): any;
  53. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  54. }
  55. }