A work-in-progress, fully custom 3D renderer written VanillaJS. Everything from keyboard input to perspective geometry done without external libraries. See it in action at juangutierrez01.github.io/canvas-renderer
- Use WASD to move around
- Use the arrow keys (↑←↓→) to rotate the camera
- Use Space to fly upwards
- Use Shift+Space to fly downwards
- Press 1 to switch to linear perspective projection (default)
- Press 2 to switch to spherical perspective projection
- Press 3 to switch to orthographic perspective projection
-
Clone this repository:
git clone https://github.com/juangutierrez01/canvas-renderer/
-
Navigate to the cloned repository:
cd canvas-renderer/ -
Start a local server in the current folder, for example, with Python:
python3 -m http.server 8000
This will start a local server on port 8000
-
Go to
http://localhost:8000on your web browser and you should see the renderer running locally.