Once you started the editor, you are able to use it with an empty scene (Here we have a scene for the demo).
The workflow with the editor is simple:
To load a Babylon.js scene (.babylon), just drag’n’drop, like the Sandbox, your scene with textures and sounds on the canvas. That’s all :)
Finally, let’s save your project and keep your configuration. There are 2 ways:
To save manually, just select the menu “Export” in the main toolbar:
A window appears with the exported project. Just copy/paste the text to a file with extension “.editorproject”.
To save time and get the perfect workflow, you can use your OneDrive storage (free). Just select the menu “Save on OneDrive” in the main toolbar:
A window appears trying to connect to OneDrive. Because the editor must have an access to your OneDrive storage, you should accept the consent. Once you accepted, you can browse your OneDrive storage and select the folder where to save the file. Finally, click on “Choose” to save the file. For a perfect workflow, you should put your Babylon.js scene (with textures and sounds) in a OneDrive folder and the save the project in this folder.
To load a saved project with your scene, simply drag’n’drop the project file (“.editorproject”) with the associated scene, and that’s all :)
When exporting a template, you are able to export the complete scene (including modifications you made in the editor) on OneDrive or local storage using Electron. Once the project has been exported, you can run the file "run.bat" or "run.sh" which will run a local web server and open the game in your favorite web browser.
Note: don't forget to install node.js
If you want to preview the result of your game without exporting a template, you can click the button "Test...". This button allows you to open a new window completely independent of the editor. In fact, this will simulate the template you would export using OneDrive or local storage (with Electron).
The differences with the "Play..." button:
When exporting a template (on OneDrive or local storage using Electron), the template contains example codes you can plug in your project.
The file "game.ts" is the equivalent of you main entry point. The method "apply" is automatically called giving the reference to the scene: you can do everything you want here.
To test your game using your code, you can run the "run.bat" or "run.sh" files to launch a local webserver reachable at "http://localhost:8000".
Anyway, when you click the button "Test...", the window will try to find the file "http://localhost:8000/libs/game.js" which contains your own code.
You are now able to develop games using the editor and your own code :)