In the documentation there is an example to create a gif animation: https://doc.babylonjs.com/how_to/render_scene_on_a_png
var imgNm = 0;
scene.render();
scene.registerAfterRender(function(){
ground.rotation.y += 1 * Math.PI / 90;
if(imgNm++ < 90) {
BABYLON.Tools.CreateScreenshotUsingRenderTarget(engine, camera, 200);
}
});
But it does not work at all. This wants to download 90 PNG images instead of a gif image.
I think the documentation lacks information here like a PG that shows how to download a Gif image