Accompanying code for "An introduction to cubism.js"