babylon.gridMaterial.d.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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.PushMaterial {
  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. /**
  35. * constructor
  36. * @param name The name given to the material in order to identify it afterwards.
  37. * @param scene The scene the material is used in.
  38. */
  39. constructor(name: string, scene: Scene);
  40. /**
  41. * Returns wehter or not the grid requires alpha blending.
  42. */
  43. needAlphaBlending(): boolean;
  44. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  45. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  46. dispose(forceDisposeEffect?: boolean): void;
  47. clone(name: string): GridMaterial;
  48. serialize(): any;
  49. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  50. }
  51. }