An animation system for JavaScript game engines