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.