Lyrics Scroller

Lyrics Scroller

Time-synced lyrics over a drifting mesh gradient, with the current line filling word by word while other lines dim and blur by distance. As playback advances the list springs each new line into a fixed focus position, and tapping any line seeks to it.

Luiz Mello
  • audio
  • player
  • animation

snippet.swift393 lines

9 files • Scroll to see all →
/// One time-synced line of a `LyricsScroller`.public struct LyricsScrollerLine: Identifiable, Equatable {    public let id: Int    /// When the line starts, in seconds from the beginning of the track.    public let time: TimeInterval    public let text: String​    public init(id: Int, time: TimeInterval, text: String) {        self.id = id        self.time = time        self.text = text    }}​/// A track with time-synced lyrics. Artwork and background come from a/// 3×3 mesh palette, so no image assets are needed.public struct LyricsScrollerSong {    public let title: String    public let artist: String    public let duration: TimeInterval​// ... (click "Show full code" to see more)
Viewing: Model.swift•1 of 9