asciiground
Version:
Library for creating animated ASCII canvas backgrounds supporting generative patterns and extensive configuration options.
24 lines (23 loc) • 794 B
text/typescript
import { AtlasPage } from './glyph-atlas.cjs';
export declare const INSTANCE_FLOATS = 16;
export declare const BATCH_SIZE = 4096;
/** Owns the shader program, instance buffer, and draw bindings. */
export declare class GlyphPipeline {
readonly instances: Float32Array<ArrayBuffer>;
private _gl;
private _canvas;
private _program;
private _buffer;
private _vertexArray;
private _shaders;
private _resolution;
private _solid;
private _clip;
constructor(gl: WebGL2RenderingContext, canvas: HTMLCanvasElement);
destroy(): void;
setClip(left: number, bottom: number, right: number, top: number): void;
initialize(): void;
prepareDraw(solid: boolean): void;
drawBatch(page: AtlasPage, count: number): void;
private _createShader;
}