approaching proper draw logic in microrepl

This commit is contained in:
Felix Roos 2023-12-16 16:14:40 +01:00
parent fc034830d0
commit 7fcd9d8a83
3 changed files with 58 additions and 26 deletions

View file

@ -102,7 +102,8 @@ export class StrudelMirror {
this.onDraw?.(haps, time, currentFrame, this.painters);
}, drawTime);
// this approach might not work with multiple repls on screen..
// this approach does not work with multiple repls on screen
// TODO: refactor onPaint usages + find fix, maybe remove painters here?
Pattern.prototype.onPaint = function (onPaint) {
self.painters.push(onPaint);
return this;