123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- declare module BABYLON {
- /**
- * The grid materials allows you to wrap any shape with a grid.
- * Colors are customizable.
- */
- class GridMaterial extends BABYLON.PushMaterial {
- /**
- * Main color of the grid (e.g. between lines)
- */
- mainColor: Color3;
- /**
- * Color of the grid lines.
- */
- lineColor: Color3;
- /**
- * The scale of the grid compared to unit.
- */
- gridRatio: number;
- /**
- * Allows setting an offset for the grid lines.
- */
- gridOffset: Vector3;
- /**
- * The frequency of thicker lines.
- */
- majorUnitFrequency: number;
- /**
- * The visibility of minor units in the grid.
- */
- minorUnitVisibility: number;
- /**
- * The grid opacity outside of the lines.
- */
- opacity: number;
- /**
- * Determine RBG output is premultiplied by alpha value.
- */
- preMultiplyAlpha: boolean;
- private _opacityTexture;
- opacityTexture: BaseTexture;
- private _gridControl;
- private _renderId;
- /**
- * constructor
- * @param name The name given to the material in order to identify it afterwards.
- * @param scene The scene the material is used in.
- */
- constructor(name: string, scene: Scene);
- /**
- * Returns wehter or not the grid requires alpha blending.
- */
- needAlphaBlending(): boolean;
- needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
- isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
- bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
- dispose(forceDisposeEffect?: boolean): void;
- clone(name: string): GridMaterial;
- serialize(): any;
- getClassName(): string;
- static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
- }
- }
|