import { AbstractFilter } from './abstract_filter.js'; import { NormalShader } from './shader/normal.js'; import type { IdentifiedWebGLRenderingContext } from './util.js'; import type { Image } from '../../display/image.js'; import type { Matrix } from '../../geom/matrix.js'; import type { BaseTexture } from './base_texture.js'; import type { RenderSession } from '../render_session.js'; export declare class WebGLSpriteBatch { vertSize: number; size: number; vertices: ArrayBuffer | null; positions: Float32Array | null; colors: Uint32Array | null; indices: Uint16Array | null; lastIndexCount: number; drawing: boolean; currentBatchSize: number; currentBaseTexture: BaseTexture | null; dirty: boolean; textures: BaseTexture[]; blendModes: number[]; shaders: NormalShader[]; sprites: Image[]; defaultShader: AbstractFilter; gl: IdentifiedWebGLRenderingContext; vertexBuffer: WebGLBuffer | null; indexBuffer: WebGLBuffer | null; currentBlendMode: number; renderSession: RenderSession; shader: NormalShader | null; /** * Creates a new SpriteBatch instance. */ constructor(); /** * Renders a sprite using WebGL. * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context. */ setContext(gl: IdentifiedWebGLRenderingContext): void; /** * Renders the sprite batch using WebGL. * @param {object} renderSession - The render session to use. */ begin(renderSession: RenderSession): void; /** * Updates the sprite batch. */ end(): void; /** * Renders a sprite using the sprite batch. * @param {Image} sprite - The sprite to render. * @param {Matrix} matrix - The transformation matrix. */ render(sprite: Image, matrix?: Matrix | null): void; /** * Binds the sprite batch to the WebGL context. */ renderTilingSprite(): void; /** * Updates the sprite batch. */ flush(): void; /** * Updates the sprite batch with a new texture. * @param {BaseTexture} texture - The texture to use. * @param {number} size - The size of the batch. * @param {number} startIndex - The start index in the batch. */ renderBatch(texture: BaseTexture | null, size: number, startIndex: number): void; /** * Destroys this sprite batch and cleans up resources. */ stop(): void; /** * Renders the sprite batch using Canvas. */ start(): void; /** * Destroys the sprite batch instance. */ destroy(): void; } //# sourceMappingURL=sprite_batch.d.ts.map