babylon.gridMaterial.d.ts 1.7 KB

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