Without schematic, I made something that might not be the same as your circuit:
The Shifty library works, but I have not PWM code yet: Test for Shifty Library - Wokwi ESP32, STM32, Arduino Simulator
I had to add a translation from the led pin to the index of the row of leds.
// Test for Shifty Library
//
// This Wokwi project: https://wokwi.com/projects/367308421388466177
// Shifty library: https://github.com/johnnyb/Shifty
// Forum: https://forum.arduino.cc/t/help-me-with-shifty-h/1137022
// Circuit based on circuit by arcostasi
// https://wokwi.com/projects/301213976182653448
//
// WARNING: This has no PWM yet
#include <Shifty.h>
// The order of the leds after the shift register
// Led 0 (index 0) will be the most right led
const int ledorder[24] =
{
7 , 6, 5, 4, 3, 2, 1, 0,
15,14,13,12,11,10, 9, 8,
23,22,21,20,19,18,17,16,
};
// Declare the shift register
Shifty shift;
int walkingled = 0;
int direction = 1;
int lastwalkingled = 0;
void setup() {
// Set the number of bits you have (multiples of 8)
shift.setBitCount(24);
// Set the data, clock, and latch pins you are using
// This also sets the pinMode for these pins
shift.setPins(11, 12, 8); // data, clock, latch
}
void loop()
{
shift.writeBit(ledorder[lastwalkingled], LOW);
shift.writeBit(ledorder[walkingled], HIGH);
lastwalkingled = walkingled;
walkingled += direction;
if(walkingled == 0 or walkingled == 23)
direction = -direction;
delay(200);
}