fix: allow multiple visuals for the same pattern

+ using .tag function instead of single .id
This commit is contained in:
Felix Roos 2024-03-28 09:31:12 +01:00
parent ab015ff48a
commit b5720355f9
5 changed files with 15 additions and 11 deletions

View file

@ -134,7 +134,7 @@ export function pianoroll({
let to = cycles * (1 - playhead);
if (id) {
haps = haps.filter((hap) => hap.context.id === id);
haps = haps.filter((hap) => hap.hasTag(id));
}
if (timeframeProp) {

View file

@ -73,7 +73,7 @@ function drawSpiral(options) {
} = options;
if (id) {
haps = haps.filter((hap) => hap.context.id === id);
haps = haps.filter((hap) => hap.hasTag(id));
}
const [w, h] = [ctx.canvas.width, ctx.canvas.height];