This doesn't really advance the state of the game much, but it was relatively easy and fun.
This demo now initializes the scene by rendering a surface based on a density function (surface is where density = 0).
The density function uses Simplex noise + a sphere. The simplex noise code was based on this library. I just converted it to TypeScript.
Simplex noise is also used to generate the wood-grain-like texture. Texturing is a lot cheaper than solving density functions so can be used to add interesting surface details.
Another great technological advancement here is that if you disable lightning, the thunder sound will also fade out.
Below the canvas are some controls that you can use to adjust the image. If you turn off lightning, light rotation, and Z shifting and turn on update rectangle display, you'll see that only a section of the scene needs to be updated.
If you up the number of octaves of the Simplex noise you may notice holes in the generated shape. This is due to the solver getting it wrong. This problem can be mitigated a bit by increasing 'density function iterations' (which is basically how hard it should look for the surface at each pixel before quitting).
Now that I've got these pretty pictures out of my system I should get on with writing some actual gamey stuff.
FPS: