excalibur
Version:
Excalibur.js is a simple JavaScript game engine with TypeScript bindings for making 2D games in HTML5 Canvas. Our mission is to make web game development as simple as possible.
29 lines (28 loc) • 878 B
TypeScript
import { Vector } from '../../../Math/vector';
import { Color } from '../../../Color';
import { ExcaliburGraphicsContextWebGL } from '../ExcaliburGraphicsContextWebGL';
import { RendererPlugin } from '../renderer';
export interface LineOptions {
color?: Color;
width?: number;
}
export declare class LineRenderer implements RendererPlugin {
readonly type = "ex.line";
priority: number;
private _context;
private _gl;
private _shader;
private _maxLines;
private _vertexBuffer;
private _layout;
private _vertexIndex;
private _lineCount;
initialize(gl: WebGL2RenderingContext, context: ExcaliburGraphicsContextWebGL): void;
dispose(): void;
private _startScratch;
private _endScratch;
draw(start: Vector, end: Vector, color: Color): void;
private _isFull;
hasPendingDraws(): boolean;
flush(): void;
}