I had to try making these cubes after they had been sliding around in my head for about an hour. It is some JavaScript that defines a 3-dimensional grid of arbitrary dimensions, filled with some number of cubes. It will select a cube at random and slide it along to an unused slot. Sounds pretty simple but a pain to get right! I wanted to be able to check for adjacent cubes without having to store an actual full-size 3D array, so boxes are instead put in a hash map keyed by their grid location.
Anyway.
Click to start the cubes animating
If the animation isn’t working for you – I’m so sorry. Perhaps one day, we can begin to reconcile our differences. Until then you will have to get your sliding cubes from someone else. Someone… better.