A simple 3D "library" in 140 bytes of JavaScript.
See the demo page: http://jsfiddle.net/aemkei/cPa3T/show/
rotate3D(
pointX, pointY, pointZ,
rotationX, rotationY,
focalLength
);
// returns new coords:
{ x: newX, y: newY, z: newZ }
Created by Martin Kleppe (@aemkei) at Ubilabs.
See the 140byt.es site for a showcase of entries (built itself using 140-byte entries!), and follow @140bytes on Twitter.
To learn about byte-saving hacks for your own code, or to contribute what you've learned, head to the wiki.
140byt.es is brought to you by Jed Schmidt, with help from Alex Kloss. It was inspired by work from Thomas Fuchs and Dustin Diaz.
Thanks! Using a 846 byte minified version (837 bytes without line breaks) of full HTML demo (1,498 bytes test.html) that centers top of screen and goes 9 layers behind fixed position. I can still see a few bytes I could shave off, but I don't feel like being that picky right now...