Cute JavaScript experiment for restacking boxes