Load a scene from a JSON file
How to load a whole scene from a data file
Starting with WADE 1.3, it is possible to export and import individual objects and whole scenes. This is how to import a simple scene, which is defined in testscene.json (click here to see the source).
This scene was initially created by setting everything up in code, then calling wade.exportScene(). Have a look at this snippet to see how that was done.
The second parameter that we are passing to wade.loadScene() indicates that we want to show a loading bar while the scene is being loaded. The loading bar can be customized - please refer to the documentation for more details.
App = function()
{
this.init = function()
{
wade.loadScene('/snippets/samples/testscene.json', true);
}
};
Your code was executed successfully!