ported to three.js r57