roman_44 Posted December 1, 2015 Share Posted December 1, 2015 Hey, Babylon Professors!I have *.babylon file exported from Blender. Whole scene with objects, lights, materials.I need to replace whole scene many times in my SPA with several different scenes. And also I need to change a lot of materials before reloading. And default behavior of SceneLoader.Load is making GET request to server with given path of the file. Is it possible to Load scene not from file on the server, but from my Javascript object (JSON) from browser?Source code for Babylon SceneLoader.Load function is too complicated for me to change it in right way. Quote Link to comment Share on other sites More sharing options...
RaananW Posted December 1, 2015 Share Posted December 1, 2015 Hi roman! Yes, this is more than possible. You can see an example here - http://www.babylonjs-playground.com/#VMFNH#18Check out line 122 and up - the scene is being serialiyed, and then loaded using "data:" as URL. Quote Link to comment Share on other sites More sharing options...
roman_44 Posted December 1, 2015 Author Share Posted December 1, 2015 This is exactly what I'm looking for!Thanks, RaananW! 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.