Texture Map Generator in JavaScript (node.js, multithreading)