Sorry for being late to the Speccy 30th anniversary party. Life got in the way. But I’m sure you understand.
(more…)
Late Spectrum tribute
Simple yet Frequently Asked Questions on three.js (SFAQ)
As promised, here’s what I learnt with my latest test with three.js :-D
(more…)
Mesh subdivision (2012 extended edition)
Back in 2004, when I was starting to experiment with OpenGL, I had the idea of creating meshes from scratch. This will come in handy for intros, since this way I won’t be needing to include the meshes’ data with the executable!
, I thought.
I would create a simple base pyramidal mesh, and subdivide it until I got something with more vertices and faces, but properly connected (not just a bunch of random points). So I when I had a couple of free days, I came up with a very rough way of creating and subdividing meshes. It was very raw, but I loved that I had done it myself!
(more…)
WebGL VGA
For some odd reason, I happened to remember a little demo that came with the first 16 bit computer I ever used–an Amstrad PC 2286. It was meant for showing off the capabilities of the new and shiny Paradise VGA graphics adapter that the 2000 line of computers incorporated. 256 simultaneous colours! 640×350 graphics! So stunning back then! I ran this demo from time to time, admiring all those colours at the same time on the screen. Then I learnt how to make the computer output them with GW-Basic, but that is another story.
I wanted to watch that demo again, but it seems that the Amstrad PC line of computers doesn’t get as much love as the CPCs do. So there is hardly any software repository (or dump) for those computers, and thus I couldn’t locate that demo. It doesn’t help that I didn’t remember its filename either…
But I found several images depicting the demo, and somehow I decided that rebuilding the demo was an excellent idea –and a great excuse to learn three.js!
This is how the original looked:

And this is what I ended up with:
animated_gif.js
Past week I wanted to make an animated GIF – but didn’t want to use GIMP or ffmpeg for that. I wondered: can an animated GIF be made in the browser? Of course it can! There was a library (JSGIF) which was a port of the original ActionScript library, AS3GIF.
I built a bit of wrapping code around the library, and did some tests to see if the port worked, first by creating a canvas and painting random squares on it, and then using them as input frames and building the GIF with that. Secondly, I tried using images. It worked acceptably enough (the color quantizer could be better, but we’re not after photo-realistic animations, after all).
So I added the drag and drop + file api stuff, but there was still something missing… the look wasn’t 90s enough! It was all begging for a bit of outdated aesthetics, but done with CSS3 and HTML5. Hence, there are multicolour logos via CSS animations, eye-cancer phosphorescent pink that turns into X-Files green glow (via CSS animations too), an HTML5 <footer> element used just because, and even a modern, 21st century blink-kind effect thanks to more CSS animations. You can’t but love it. And those huge frames! They are done with an ingenious abuse of CSS borders, but that could be done with CSS five years ago already. Nothing new here, but all very funny in any case.
Note that even if I finished this yesterday –April’s Fools– it wasn’t originally intended to be an April’s Fools joke. Hopefully you can take it seriously, right?
Right!
PS I actually looked into making animated WebP’s but the library I found wasn’t fast enough so all the fun factor was lost :-(
Maybe in a couple of years, when WebP is retro already…


