The end of the evolution of this entire project was a complete JavaScript library called zengine.js
. I have a seperate repository hosting that, so if you want to see my best code, explore there.
My goal was to simulate a 3d world in the browser from complete scratch. This repository holds all of my revisions of the code to do so.
Why simulating 3d is so simple and how to do it (i.e. an explanation of this code) can be found on my website here.
The files are versioned by the number following the v
and those with x2
in their names are designed to work on a phone in a VR headset. The only exception to this scheme is 3dv2vr
which was an attempt to render the two eyes for virtual reality on one canvas (which I realised was inferior to using two canvases - arranged with css).
To save downloading the whole repo, I setup GitHub pages to host all the versions. Just follow the links to see the evolution! (controls are WASD
for movement, ZX
for up down, QE
for looking left and right and RF
for looking up and down)