All files / player-browser/src/view/shared/playfield hidden-note-channels.ts

100% Statements 1/1
100% Branches 4/4
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12                  7x    
/**
 * The lanes whose notes the playfield does not draw: the scratch lanes AUTO SCRATCH plays while **Auto scratch notes**
 * is HIDE (AC 34's オートスクラッチ表示), or `undefined` when every note is drawn. Display only: the notes still play,
 * sound and count.
 */
export function resolveHiddenNoteChannels(
  autoScratchNotes: 'SHOW' | 'HIDE' | undefined,
  autoScratchChannels: ReadonlySet<string>,
): ReadonlySet<string> | undefined {
  return autoScratchNotes === 'HIDE' && autoScratchChannels.size > 0 ? autoScratchChannels : undefined;
}