javascript based physics and graphics engine