Comment by umvi
5 years ago
I'm assuming he used something like SolidWorks to CAD up the parts, but then it looks like he custom made all the animation stepping widgets and camera rotation logic and various shaders for the different effects in pure JS[0]? Surely he didn't write this JS by hand (i.e. it was generated from blender3d or solidworks files or something?).
I would like an article on how he made the interactive animations in the article.
I think it can't be understated how important it is to able to rotate, and move the playback forwards and backwards.
It's almost like being able to hold the part in your hands, examine the reasoning behind its structure and "debug" your mental model of it by playing its operation back and forth.
Exactly, having control over the artifact is so empowering for learning and curiosity. A simple image or gif wouldn't be nearly as engaging.
It really reminded me of the educational 'toys' that I used while I was attending Montessori school. You could go at your own speed and come to understand a concept by letting you play with all the constituent parts when you felt like it - or if you saw someone else doing it and joined in.
One of the 'toys' I remember from my Montessori experience was these long bead chains. They had all different sizes, e.g. one would be a chain of 8 segments, each containing 8 beads on a rod between the joints. The '8' chain would be blue and have an associated blue cube of beads 8x8x8. I remember the '10' chain and cube was something really to be seen.
We also had really large blocks, because someone dropped one on my head.
"I did the 3D models in @Shapr3D with small post processing in Blender, animations are just done by hand" https://twitter.com/BCiechanowski/status/1387827101294686210...
"Just bare webGL, it’s not that many lines of code to setup and it gives me complete control over what I want to render" https://twitter.com/BCiechanowski/status/1388504529646211076...
> 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.