SwiftUI - Random word animation with letters scrolling

I would like to implement a random word generator, shaped similar as to a Cryptex. I would like to have the single letters that rotate in a "wheel picker style" (as if the system was going through all the letters of the alphabet to pick the right ones) and that one at a time they'd stop to reveal the word.

I have implemented a string that gets randomized, with the single letters that all have individual 3d rotation animation. However, I have no idea on how to go from here to the result I'd like to have. In the code listed here below there's also a function that I created to generate the delay, so each letter could animate a bit longer. I tried adding this func to the duration value of the Animation, but with that the animation stops working. I left the func anyway, in case it might be useful.

import SwiftUI
import Foundation

struct ContentView: View {
    @State private var degrees = 0.0
    var words = ["One", "Two", "Three", "Four", "Five", "Six", "Seven"]
    @State var text = "???"
    var body: some View {
        VStack {
            HStack(spacing: 0) {
                ForEach(Array(text), id: \.self) { letters in
                        .font(.system(size: 30))
                        .rotation3DEffect(.degrees(degrees), axis: (x: 1, y: 0, z: 0))
                        .animation(Animation.linear(duration: 3).speed(10), value: degrees)
            Button {
                withAnimation {
                    self.degrees += 720
                    let randomIndex = Int.random(in: 0...(words.count-1))
                    text = words[randomIndex]
            } label: {
                Text("Get a random word!")
            .padding(.top, 40)
    func generateDelay(letter: String.Element) -> Double {
        let delayFromIndex : Double = Double(Array(text).firstIndex(where: { $0 == letter }) ?? 0)
        let delay : Double = 3 + delayFromIndex
        return delay

extension ForEach where Data.Element: Hashable, ID == Data.Element, Content: View {
    init(values: Data, content: @escaping (Data.Element) -> Content) {
        self.init(values, id: \.self, content: content)

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum