Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Excellent resource! I really like the fact that everything is centred around the idea of just a single 'PutPixel' function. Makes things much more approachable.

I've took the liberty of rewriting the 'Perspective projection' demo (1) in more up-to-date Javascript, using ES6 classes and all the other niceties that modern browsers have. I also used the regular canvas line drawing methods to focus on just the vertex-to-line conversion, and updated the code so that it will work on any resolution. https://codepen.io/hay/pen/gOLazpm

1: https://gabrielgambetta.com/computer-graphics-from-scratch/d...



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: