a simple rotation javascript library