convert obj to json with three.js utils