Idea and base animated svg came both from openclipart. Jarda made this one of a single cube, where each slice was a separate clone of a path in the defs section -moved the parents to a new layer and made them into groups instead for the custom colours. Also, the original used one animation definiton for both rotating in a full circle -switched that to one spinning and another going back and forth between 15° and -15°.

Quite complicated approach with all the "unnecessary" groupings. Next step would be using diagonal slicing for a more consistent look. This one uses 3 parent objects so there are plenty of space for fine-tuning the process...

Anyway, I'm satisfied that this one works as I'm totally unfamiliar with javascript animation in general.