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

> Surely he didn't write this JS by hand

It seems parts of it are auto-generated like all those co-ordinates. But then some parts appear as if they are hand-coded.

I also noticed that other program texts are getting assigned to variables (example "line_vert_src"). Could someone please describe what's going on?

That explosion animation is absolutely mind-blowing. Goes to show what can be achieved if someone focuses their attention to a topic to understand it in depth and explain it at the same depth.



> I also noticed that other program texts are getting assigned to variables (example "line_vert_src"). Could someone please describe what's going on?

These are fragments of code in "OpenGL ES Shading Language", passed to WebGL. See for instance [0] for a tutorial.

[0] https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/T...


I looked through the code. The model indices may have been generated, but literally everything else looks hand written (albeit probably lots of copy paste).

He doesn't even use any libraries for the 3d math, input, rendering, etc. Pretty inspiring.




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

Search: