three.js implementation of a barnes-hut simulation