three.js - Three js obj loader big file -
i have file obj lots of features , vertices, more 800 000. when load through obzhmtloader hangs, freez. warning script crashes freezes. pleas.
var onprogress = function ( xhr ) { if ( xhr.lengthcomputable ) { var percentcomplete = xhr.loaded / xhr.total * 100; //console.log( math.round(percentcomplete, 2) + '% downloaded' ); } }; var onerror = function ( xhr ) { }; three.loader.handlers.add( /\.dds$/i, new three.ddsloader() ); var loader = new three.objmtlloader(); loader.load( '13/13.obj', '13/13.mtl', function ( object ) { scene.add( object ) }, onprogress, onerror );
you should use objloader instead of objmtlloader.
Comments
Post a Comment