import type { Texture } from "@babylonjs/core/Materials/Textures/texture"; import type { Nullable } from "@babylonjs/core/types"; /** * Material transparency mode * * Constants are same as Babylon.js MaterialTransparencyMode */ export declare enum TransparencyMode { Opaque, AlphaTest, AlphaBlend } /** * Texture alpha checker * * This class is used to check if the texture has alpha on geometry */ export declare class TextureAlphaChecker { private readonly _resolution; private readonly _textureCache; private _context; private _vertexShader; private _fragmentShader; private _program; private _uvBuffer; private _indexBuffer; private readonly _indicesBytePerElement; /** * Create a texture alpha checker * @param uvs Geometry uvs * @param indices Geometry indices * @param resolution Resolution of the canvas used to check the texture */ constructor(uvs: Float32Array, indices: Uint16Array | Uint32Array, resolution?: number); private _createRenderingContext; private _prepareContext; private _getWebGlTexture; private _bindUvAndIndexBuffer; /** * Check if the texture has alpha on geometry * * "Does the textures on the geometry have alpha" is simply to make sure that a portion of the textures (the part that is rendered) have alpha * @param textureBuffer Texture array buffer * @param fallbackTexture When the texture is unsupported format, dependent on babylon.js Texture Loaders * @param startOffset start offset of the indices * @param length length of the indices * @param alphaThreshold alpha threshold * @param alphaBlendThreshold alpha blend threshold * @returns Transparency mode */ textureHasAlphaOnGeometry(textureBuffer: ArrayBuffer, fallbackTexture: Nullable, startOffset: number, length: number, alphaThreshold: number, alphaBlendThreshold: number): Promise; /** * Dispose this object */ dispose(): void; }