Friday 15 April 2011

javascript - How to load many different named OBJ-Files from Folder -



javascript - How to load many different named OBJ-Files from Folder -

is there comfortable way load many files (1.000 files,all ~ 30mb) folder ? write javascript , utilize objloader.js three.js framework. loading 1 or 2 of obj files wont problem, nice examples on threejs.org, how can load bunch of files ?

atm work (basic) function:

function loadmodellbynameobj(name){ var meshmat = new three.meshlambertmaterial({color: 0x339933,side:three.doubleside}); loader = new three.objloader(loadingmanager); loadingmanager.onprogress = function( item, loaded, total) { console.log(item,loaded,total); } loader.load(name+".obj",function(object){ for(var = 0; < object.children.length;i++) { object.children[i].material = meshmat; object.children[i].geometry.computefacenormals(); object.children[i].geometry.computevertexnormals(); } objectgroup.add(object); },onprogress,onerror); }

but how can pass there folder instead of every single file :s.

thanks!

javascript html5 three.js multifile

No comments:

Post a Comment