Converted all C++ sources to JS but needs some rework to get it working
Finished converting to js now fixing code to work in js
Fix code, now output some pixels but there are still some problems
Force to not use worker when worker is present

It is impossible to debug js code in a webworker (harder)
Few improvements

Javascript in "use strict" mode. It was adding variables to the window
and I guess it was pretty slow for that reason. Now variables should be
scoped correctly.

The script resize the image in multiple partitions on top of each
others.. Not sure why it's happening but I guess it's an offset error