simplify draw plumbing
This commit is contained in:
parent
1a0dff4081
commit
04a0952a22
6 changed files with 15 additions and 36 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue