News for hackers. Stuff that matters.
Re:Internal Combustion Engine by vishnugupta on Saturday May 01, 2021 @02:49AM (#27003915)
> 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.

Re:Internal Combustion Engine by JW_00000 on Saturday May 01, 2021 @10:40AM (#27006702)
> 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...

Re:Internal Combustion Engine by deepfriedrice on Sunday May 02, 2021 @03:13PM (#27018002)
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.