@box2d/debug-draw
Version:
Debug drawing helper for @box2d
24 lines • 1.32 kB
TypeScript
import { b2Draw, b2Transform, b2AABB, RGBA, XY, b2Readonly } from "@box2d/core";
export declare class DebugDraw implements b2Draw {
private readonly ctx;
private readonly center;
private zoom;
constructor(ctx: CanvasRenderingContext2D);
Prepare(centerX: number, centerY: number, zoom: number, flipY?: boolean): void;
Finish(): void;
PushTransform(xf: b2Readonly<b2Transform>): void;
PopTransform(_xf: b2Readonly<b2Transform>): void;
DrawPolygon(vertices: XY[], vertexCount: number, color: RGBA): void;
DrawSolidPolygon(vertices: XY[], vertexCount: number, color: RGBA): void;
DrawCircle(center: XY, radius: number, color: RGBA): void;
DrawSolidCircle(center: XY, radius: number, axis: XY, color: RGBA): void;
DrawParticles(centers: XY[], radius: number, colors: RGBA[] | null, count: number): void;
DrawSegment(p1: XY, p2: XY, color: RGBA): void;
DrawTransform(xf: b2Readonly<b2Transform>): void;
DrawPoint(p: XY, size: number, color: RGBA): void;
DrawString(x: number, y: number, align: "left" | "center" | "right", message: string): void;
DrawStringWorld(x: number, y: number, message: string): void;
DrawAABB(aabb: b2AABB, color: RGBA): void;
static MakeStyleString(color: RGBA, a?: number): string;
}
//# sourceMappingURL=index.d.ts.map