simplify draw plumbing

This commit is contained in:
Felix Roos 2024-03-28 06:25:24 +01:00
parent 1a0dff4081
commit 04a0952a22
6 changed files with 15 additions and 36 deletions

View file

@ -277,8 +277,8 @@ export function getDrawOptions(drawTime, options = {}) {
export const getPunchcardPainter =
(options = {}) =>
(ctx, time, haps, drawTime, paintOptions = {}) =>
pianoroll({ ctx, time, haps, ...getDrawOptions(drawTime, { ...paintOptions, ...options }) });
(ctx, time, haps, drawTime) =>
pianoroll({ ctx, time, haps, ...getDrawOptions(drawTime, options) });
Pattern.prototype.punchcard = function (options) {
return this.onPaint(getPunchcardPainter(options));