3D transform calculations ported from this three.js demo.
Made with ❤️ by kt.sach.in(Sachin Tribhuwan)