Doodle3D-Slicer/three.js-master/examples/js/loaders/ctm/CTMWorker.js

20 lines
338 B
JavaScript
Raw Normal View History

2015-06-12 15:58:26 +02:00
importScripts( "lzma.js", "ctm.js" );
self.onmessage = function( event ) {
var files = [];
for ( var i = 0; i < event.data.offsets.length; i ++ ) {
var stream = new CTM.Stream( event.data.data );
stream.offset = event.data.offsets[ i ];
files[ i ] = new CTM.File( stream );
}
self.postMessage( files );
self.close();
}