three.js and Udacity - energy balancing