/** * A fixed-size vertex array buffer for batching vertex data. * Renderer-agnostic — stores vertex data in typed arrays (Float32/Uint32). * Batchers must check isFull() and flush before the buffer overflows. * @ignore */ export default class VertexArrayBuffer { constructor(vertexSize: any, maxVertex: any); vertexSize: any; maxVertex: any; vertexCount: number; buffer: ArrayBuffer; bufferF32: Float32Array; bufferU32: Uint32Array; bufferU8: Uint8Array; /** * clear the vertex array buffer * @ignore */ clear(): void; /** * return true if full * @ignore */ isFull(vertex: any): boolean; /** * push a new vertex to the buffer * @param {number} x - x position * @param {number} y - y position * @param {number} z - z position (per-renderable depth; 0 under ortho) * @param {number} u - texture U coordinate (or aNormal.x for primitives) * @param {number} v - texture V coordinate (or aNormal.y for primitives) * @param {number} tint - tint color in UINT32 (argb) format * @param {number} [textureId] - texture unit index for multi-texture batching * @param {number} [normalTextureId] - paired normal-map texture unit index, or `-1` for unlit quads * @ignore */ push(x: number, y: number, z: number, u: number, v: number, tint: number, textureId?: number, normalTextureId?: number): this; /** * push a new vertex with all-float data to the buffer * @param {ArrayLike} data - float values for one vertex * @param {number} srcOffset - start index in the source data * @param {number} count - number of floats to copy (should equal vertexSize) * @ignore */ pushFloats(data: ArrayLike, srcOffset: number, count: number): this; /** * push a new vertex to the buffer (mesh format: x, y, z, u, v, tint). * Color is unpacked from the ARGB Uint32 input into 4 normalized * `[0, 1]` floats — the mesh batcher's `aColor` attribute is * `FLOAT × 4` rather than `UNSIGNED_BYTE × 4` to avoid NaN-pattern * bit values getting canonicalized on Metal-backed WebGL drivers. * See `mesh_batcher.init` for the rationale. * @ignore */ pushMesh(x: any, y: any, z: any, u: any, v: any, tint: any): this; /** * return a reference to the data in Float32 format * @ignore */ toFloat32(begin: any, end: any): Float32Array; /** * return a reference to the data in Uint32 format * @ignore */ toUint32(begin: any, end: any): Uint32Array; /** * return a byte-view reference to the data — use this for `gl.bufferData` * uploads to avoid the NaN-canonicalization that some drivers perform * on Float32 uploads of the same backing buffer (see the constructor's * `bufferU8` comment). * @ignore */ toUint8(byteBegin: any, byteEnd: any): Uint8Array; } //# sourceMappingURL=vertex.d.ts.map