My collection of games (and a few tools) aims to demonstrate the use of plain JavaScript and the 2D canvas running in browsers. Several of the pages have downloads that fully explain how the programs work, including 3D terrain generation. In some cases you can download the full sources. The card game (spider solitaire) has a set of pages describing how the program was developed, to help beginners.
Some of the programs fall into two groups based on two very different frameworks of my own devising. One group is based on The Forest. If you go to its page you will find not only my current version but also PDFs describing its history and how my limitless terrain generator works. (No Perlin and no tiles!) The best example of the other group is The Green for which I built a library of 3D shapes in the 2D canvas. All of these things are written in very plain old-style JavaScript to ensure they run in as many browsers as possible.
These days I make these things as a hobby, to keep my mind active. As I am retired I want to make the details available to encourage others. I think HTML/JS is a great creative environment. I have written a detailed set of pages on "How to start creating graphical browser games".