Made code work with three.js R69