UNPKG

@lightningjs/renderer

Version:
34 lines (33 loc) 1.1 kB
import type { AttributeInfo } from './ShaderUtils.js'; /** * Number of 32-bit floats per vertex in the dynamically updated quad buffer: * a_position (2) + a_textureCoords (2) + a_color (1 packed 4xUint8). a_nodeCoords * lives in a separate static buffer shared by all BufferCollections. */ export declare const QUAD_VERTEX_STRIDE = 5; export interface BufferItem { buffer: WebGLBuffer; attributes: Record<string, AttributeInfo>; } /** * Represents a collection of WebGL Buffers along with their associated * vertex attribute formats. */ export declare class BufferCollection { readonly config: BufferItem[]; constructor(config: BufferItem[]); /** * Get the WebGLBuffer associated with the given attribute name if it exists. * * @param attributeName * @returns */ getBuffer(attributeName: string): WebGLBuffer | undefined; /** * Get the AttributeInfo associated with the given attribute name if it exists. * * @param attributeName * @returns */ getAttributeInfo(attributeName: string): AttributeInfo | undefined; }