I put the code on my AWS server and it created a black screen and that was it. I tried it with both Firefox and Chrome.
This code needs to be run by
NW.js. A standard browser will not run this code, because the code contains functions specific to NW.js and Node.js. The black thing you can see is a canvas element, but, because a standard browser cannot understand some parts of the JavaScript code, the whole script is stopped and nothing is drawn on the canvas.