Animation framework in WebGL and Javascript