import type { BaseTexture } from './base_texture.js'; import type { IdentifiedWebGLRenderingContext } from './util.js'; import type { Image } from '../../display/image.js'; import type { RenderSession } from '../render_session.js'; import type { DisplayObject } from '../display_object.js'; /** What the fast batch draws: a container whose children are plain images sharing one texture. */ export type FastBatchRoot = DisplayObject & { children: Image[]; }; import type { FastShader } from './shader/fast.js'; export declare class FastSpriteBatch { gl: IdentifiedWebGLRenderingContext; vertSize: number; maxSize: number; size: number; vertices: Float32Array; indices: Uint16Array; vertexBuffer: WebGLBuffer | null; indexBuffer: WebGLBuffer | null; lastIndexCount: number; drawing: boolean; currentBatchSize: number; currentBaseTexture: BaseTexture | null; currentBlendMode: number; renderSession: RenderSession; shader: FastShader | null; matrix: Float32Array | number[] | null; /** * Creates a new FastSpriteBatch instance. * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context. */ constructor(gl: IdentifiedWebGLRenderingContext); /** * Sets the WebGL context for this batch. * @param {WebGLRenderingContext & { id: number }} gl - The WebGL rendering context. */ setContext(gl: IdentifiedWebGLRenderingContext): void; /** * Renders a sprite batch using WebGL. * @param {object} spriteBatch - The sprite batch to render. * @param {object} renderSession - The render session to use. */ begin(spriteBatch: FastBatchRoot, renderSession: RenderSession): void; /** * Updates the sprite batch. */ end(): void; /** * Flushes the sprite batch to WebGL. * @param {object} spriteBatch - The sprite batch to flush. */ render(spriteBatch: FastBatchRoot): void; /** * Renders a sprite using WebGL. * @param {Image} sprite - The sprite to render. */ renderSprite(sprite: Image): void; /** * Binds the sprite batch to the WebGL context. */ flush(): void; /** * Renders a sprite using the sprite batch. */ stop(): void; /** * Sets up the sprite batch for WebGL rendering. */ start(): void; } //# sourceMappingURL=fast_sprite_batch.d.ts.map