TestyRabbit Posted June 17, 2017 Share Posted June 17, 2017 Hey guys! So first off, Babylon.js is awesome. I've used THREE.js before and I recently switched to babylon for a project I'm doing and I love it. First, I made my scene in Unity and used their exporter which worked great at first, but I noticed that the exporter bakes in lighting and that's not the effect I'm going for. I've decided then to try and make a scene just with pure javascript because it isn't a very complicated scene. However, I'm a big fan of the loading screen/feedback that is recieved when using the BABYLON.SceneLoader and I wanted to know if there was an easy way to take a scene I made in javascript and convert it to a .babylon file so I could use the SceneLoader? Thanks! -TestyRabbit Quote Link to comment Share on other sites More sharing options...
JohnK Posted June 18, 2017 Share Posted June 18, 2017 Hi and welcome to the forum. The answer is yes and I did it a couple of years ago so some bits are a bit hazy but here goes. The following github has two functions the first write the .babylon gile as text to a new page, the second downloads the fole to your computer. https://github.com/Cubees/Cubees.github.io/blob/master/factory/shared/exporter.js To see it working in context go to http://cubees.github.io And choose extrude or lathe. To do a whole scene read about serialize https://doc.babylonjs.com/classes/2.5/sceneserializer 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.