Dad72 Posted November 29, 2018 Share Posted November 29, 2018 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 PG here: https://www.babylonjs-playground.com/#ZQ1KCR#3 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted November 29, 2018 Share Posted November 29, 2018 (just a little advice for forum users: do not click on the PG link, you will be asked 90 times by your browser where you want to download each image ? ) Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted November 29, 2018 Share Posted November 29, 2018 And about your issue I'm not sure if it's possible to generate a gif using javascript? In that case, documentation has to be more explicit, saying that gif isn't exported, but that you can generate image frames so as to transform them in gif with your own tools (Photoshop, Gimp, imageMagick, etc) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 29, 2018 Author Share Posted November 29, 2018 Yes, this is possible with javascript. there are several libs including : gifshot I have to modify the PG so that only 10 images (no 90). ? The documentation says we can generate gif, so I test it and it does not work. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 29, 2018 Share Posted November 29, 2018 There is an extension that creates animated gifs, but I'm not sure what is the state of the code. Give it a shot if you are willing. https://github.com/BabylonJS/Extensions/tree/master/GIFExporter Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 29, 2018 Author Share Posted November 29, 2018 I already have what is needed.I just point out that something in the documentation is not clearly explain.What is explain, does not work, because it certainly lacks more precision to generate a gif image. I do not ask how to do it. Look at what is written in the documentation at the bottom of the page. Maybe an example PG would help, because I find the information very misleading and not complete. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 29, 2018 Share Posted November 29, 2018 Sure. Please file an issue at https://github.com/BabylonJS/Documentation or better yet, if you feel inclined, open a PR. ? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 29, 2018 Author Share Posted November 29, 2018 Thank you but I know the address. I know Babylon since he exists. I am not a newcomer. I'm not going to multiply the reports now that I've done it here, I'm doing it on the forum by habit, and I do not want to make PR not knowing how to edit with proper English. I therefore prefer to abstain and leave those who know how to do it. Quote Link to comment Share on other sites More sharing options...
bghgary Posted November 29, 2018 Share Posted November 29, 2018 We don't track issues in the forums, so it needs to be on GitHub or this may get lost in the wind. I've filed it here: https://github.com/BabylonJS/Documentation/issues/1333 Dad72 1 Quote Link to comment Share on other sites More sharing options...
Nodragem Posted November 29, 2018 Share Posted November 29, 2018 @Dad72 I think that your English is fine, and don' t forget that your PR will be reviewed by someone else, so your English will be corrected if needed then. There are many people who aren' t native English speakers (including me), and still our documenting effort is worth more than no documentation ! bghgary 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 29, 2018 Author Share Posted November 29, 2018 @Nodragem, You are right Nodragem. But I do not really like GitHub, so I just post things here and lets do the people that are more competent than me. But I understand what you are saying. It's just that I'm extremely lazy sometimes, especially during the winters. ? I preferred the use of the Forum which suits me well and remain a user of Babylon rather than a contributor, even if I sometimes contribute and that it will surely happen again from time to time. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 30, 2018 Share Posted November 30, 2018 Fixed ? bghgary 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.