make three.js local and accomodate API changes.