textmode.js
Version:
Apply real-time ASCII conversion to any HTML canvas.
22 lines (21 loc) • 802 B
TypeScript
/**
* Abstract base class for all renderable shapes in the WebGL renderer.
* Provides a consistent interface for fill and stroke rendering across different shape types.
*/
export declare abstract class Shape {
protected gl: WebGLRenderingContext;
protected x: number;
protected y: number;
constructor(gl: WebGLRenderingContext, x: number, y: number);
/**
* Render the filled version of this shape.
* Should be implemented by each shape to provide optimal fill rendering.
*/
abstract renderFill(): void;
/**
* Render the stroke (outline) version of this shape.
* Should be implemented by each shape to provide optimal stroke rendering.
* @param weight The stroke thickness in pixels
*/
abstract renderStroke(weight: number): void;
}