import { vec2, vec3 } from 'gl-matrix'; /** * Vertex cloud that describes each glyph that is to be rendered on the screen. */ export declare class GlyphVertices { static readonly FLOATS_PER_TEXCOORD = 4; static readonly FLOATS_PER_ORIGIN = 3; static readonly FLOATS_PER_TANGENT = 3; static readonly FLOATS_PER_UP = 3; /** @see {@link origins} */ protected _origins: Float32Array; /** @see {@link tangents} */ protected _tangents: Float32Array; /** @see {@link ups} */ protected _ups: Float32Array; /** @see {@link texCoords} */ protected _texCoords: Float32Array; /** * Concatenates multiple glyph vertices into a single new glyph vertices object. * @param array - Array of glyph vertices. Undefined glyph vertices will be ignored. */ static concat(array: Array): GlyphVertices; /** * Constructs a specialized arrays representing glyph vertex data. * @param numberOfGlyphs - The number of glyph vertices required (number of glyphs). */ constructor(numberOfGlyphs: number); /** * Efficiently reduces the size of all underlying float arrays (copies data if reduced). * @param numberOfGlyphs - Target number of glyphs to reduce the vertices to. */ shrink(numberOfGlyphs: number): void; /** * Typed vec2 view to the lower left texture coordinate of the glyph at given index. * @param index - Index of the glyph to return the lower left texture coordinate of. */ uvLowerLeft(index: number): vec2; /** * Typed vec2 view to the upper right texture coordinate of the glyph at given index. * @param index - Index of the glyph to return the upper right texture coordinate of. */ uvUpperRight(index: number): vec2; /** * Typed vec3 view to the origin of the glyph at given index. * @param index - Index of the glyph to return the origin of. */ origin(index: number): vec3; /** * Typed vec3 view to the tangent of the glyph at given index. * @param index - Index of the glyph to return the tangent of. */ tangent(index: number): vec3; /** * Typed vec3 view to the up vector of the glyph at given index. * @param index - Index of the glyph to return the up vector of. */ up(index: number): vec3; /** * Number of glyph vertices. */ get length(): number; /** * Read-access to all glyph vertices' origins in a single typed buffer. */ get origins(): Float32Array; /** * Read-access to all glyph vertices' tangent vectors in a single typed buffer. */ get tangents(): Float32Array; /** * Read-access to all glyph vertices' up vectors in a single typed buffer. */ get ups(): Float32Array; /** * Read-access to all glyph vertices' texture coordinates (lower left and upper right) in a single typed buffer. */ get texCoords(): Float32Array; }