Did your approach require JS or were you able to do the rotating part completely in CSS and SVG?
The pyramid also has layers and an initial routine where the layers get added, with a carousel made from details/summary elements to describe the layers. Clicking on the layers opens the respective details/summary and the colour changes.
The shading of the pyramid was particularly hard, since that changes as it rotates. I will have to do that in CSS too...