implement onPaint with pattern state

This commit is contained in:
Felix Roos 2024-06-02 03:00:57 +02:00
parent 94e411aa7a
commit faba4a4e4e
2 changed files with 27 additions and 6 deletions

View file

@ -94,6 +94,14 @@ export class Pattern {
return result;
}
// runs func on query state
withState(func) {
return this.withHaps((haps, state) => {
func(state);
return haps;
});
}
/**
* see `withValue`
* @noAutocomplete