Mandelbrot Set/Fractal with Vanilla JS. Here I used web workers to move the fractal calculations to a separate thread. Currently, web workers is not being used in most projects, but I am sure the multithreading web applications and appropriate frameworks of web workers has potential to be used in the future.

I am against the idea of using vanilla js in the middle of a huge project because sooner or later, developers will have to create their own framework which will not only drastically increase the time of developing a project but it will also make the application more unstable. Anyway, since frameworks and libraries can make us lazy we sometimes need to develop something small in raw javascript so we do not to lose skills and are challenged to go out of our comfort zone.

The source code of the fractal is available in my GitHub. I spread the calculation of the Mandelbrot set to several web workers. The transfer of such huge sets of data from web workers to main thread (canvas owner thread) created a bottle neck was in the which slowed down the processing time. To solve this problem, use OffsetCanvas technique, though it is unfortunately not supported by Firefox and Safari.


CodePen Project