Nominally that's a use case for the LLVM compiler and WebAssembly, but I don't know what kind of simple support WASM has any for WebGL, on the other hand you also have stuff like this from 2011 that suggest one might be able to make LLVM act as an interface layer if WRI wanted to support web animations:
llvm.org/devmtg/2011-11/Wilhelmy_Exporting3DScenes.pdf