@dartbot/dartboard
Version:
Dartboard implemented as a vanilla web component
17 lines • 596 B
JavaScript
import { drawHits } from './draw-hits';
import { drawNumbers } from './draw-numbers';
import { drawSectors } from './draw-sectors';
import { drawWire } from './draw-wire';
/**
* Draw a dartboard to the canvas
* @param board Board dimensions
* @param theme Theme to style the board
* @param context Canvas context to draw the board to
*/
export const drawBoard = (board, theme, hits, context) => {
drawSectors(board, theme, context);
drawWire(board, theme, context);
drawNumbers(board, theme, context);
drawHits(theme, context, hits);
};
//# sourceMappingURL=draw-board.js.map