3d - Texture and material loading issue with THREE.OBJLoader2.WWOBJLoader2 -
i using three.js include 3d models (obj + mtl format) in web application. size of 3d models big( 35-70mb ), need load them using web worker in order avoid freezing web page. have tried web worker based method using three.objloader2.wwobjloader2, 1 texture getting applied 3d model. have tried using different 3d models , result same.
reader.addeventlistener( 'load', function ( event ) { var uint8arraynew = new uint8array(event.target.result); objbuffer = uint8arraynew; initpostgl(); prepdata = new three.objloader2.wwobjloader2.prepdataarraybuffer( workerinput.obj, // overall model name objbuffer, // obj file arraybuffer workerinput.path, // texture path mtlstring // mtl string ); objectgroup = new three.group(); objectgroup.name = workerinput.obj; prepdata.setscenegraphbasenode( objectgroup ); prepdata.setstreammeshes( true ); wwobjloader2.setdebug(false); wwobjloader2.preparerun( prepdata ); wwobjloader2.run(); }, false ); reader.readasarraybuffer( objectasbuffer );
here link obj file : https://www.dropbox.com/s/95l3cwv68a0r5hi/sampleobjmtlmodel.zip?dl=0
Comments
Post a Comment