Would be nice to be able to bulk export .js files to .obj files
Author: Fantashit
1 thought on “Feature Request Bulk export .js to .obj”
The gist would be:
constTHREE=require('three');constfs=require('fs');require('three/examples/js/exporters/OBJExporter');constfiles=['file1.js','file2.json'];constloader=newTHREE.ObjectLoader();// or JSONLoader, depending on the format.constexporter=newTHREE.OBJExporter();files.forEach((file)=>{loader.load(file,(result)=>{varobjContent=exporter.parse(result);fs.writeFile(file.replace(/\.js(on)?/,'.obj'),objContent);});});
^whether it’s really quite that easy to use three.js in node.js, i’m not sure… might need to hotpatch global.XMLHttpRequest or something.
The gist would be:
^whether it’s really quite that easy to use three.js in node.js, i’m not sure… might need to hotpatch
global.XMLHttpRequest
or something.