A simple javascript sprite based animation engine (canvas)