home | animated | Sketchfab |
The program, written by Eric Haines, is in three.js, an open-source 3D graphics language written atop WebGL. Note that on some mobile devices the model will have flickering, due to precision limitations of the device itself.
The process to retrieve the data from the GIF animation was a bit circuitous: first, Andrew added PDF export to his Processing program that produced the animation. The resulting PDF was converted by Eric to a pure-ASCII (vs. binary) version by using qpdf, a free open-source PDF transformation program. The ASCII PDF was then processed by a custom Perl program to extract only the data needed to hold the model. A custom reader was written in JavaScript to load the data into the three.js viewing program. This program manipulates the frames of the animation by using a vertex shader on the GPU, so avoiding the overhead of transforming individual objects on the CPU. At this point the original Processing program's PDF output data is a bit transformed, but still recognizable as individual frames. |
||
three.js |