dist/webworker_example/index.js
function loadFile(file) {
    console.log('loadFile:', file);

    // <file> can be Image, File URL object or URL string (http://* or data:image/*)
    rasterToGcode.load(file).then(function(rtg) {
        console.log('rasterToGcode:', rtg);
    })
    .catch(function(error) {
        console.error('error:', error);
    });
}
function loadFile(file) {
    console.log('loadFile:', file);

    // <file> can be Image, File URL object or URL string (http://* or data:image/*)
    rasterToGcode.load(file).then(function(rtg) {
        console.log('rasterToGcode:', rtg);
    })
    .catch(function(error) {
        console.error('error:', error);
    });
}
function loadFile ( file ) { console . log ( 'loadFile:' , file ) ; // <file> can be Image, File URL object or URL string (http://* or data:image/*) rasterToGcode . load ( file ) . then ( function ( rtg ) { console . log ( 'rasterToGcode:' , rtg ) ; } ) . catch ( function ( error ) { console . error ( 'error:' , error ) ; } ) ; }
Load the input file
Load the input file