block by aemkei 1127274

rotate3D - 140byt.es

rotate3D - 140byt.es

A simple 3D “library” in 140 bytes of JavaScript.

See the demo page: http://jsfiddle.net/aemkei/cPa3T/show/

Usage

rotate3D(
  pointX, pointY, pointZ, 
  rotationX, rotationY, 
  focalLength
);

// returns new coords: 
{ x: newX, y: newY, z: newZ }

Author

Created by Martin Kleppe (@aemkei) at Ubilabs.

For more information

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.

index.js

LICENSE.txt

annotated.js

package.json

test.html