// Update the `keyFrame`. keyFrame += 0.5; // This is just a huge state machine progression. switch (keyFrame) { // In the first 4 seconds we just run through the existing log messages. case 0.5: case 1: case 1.5: ...