Hello guys!
I would like to propose some changes to the BabylonJS Playground and implement them as well, if approved.
Create local backup of the code
I propose to create a local backup of the source code in certain situations. We can use IndexedDB over LocalStorage, so we have no size limit and IndexedDB is async
, LocalStorage is not.
Local backup every X seconds (configurable)
I lost my work many times just because I accidentaly navigated away from the PG when I am working on my notebook and instead of FN + Left Arrow (like HOME on a full size desktop keyboard) I press ALT + Left Arrow which navigates back in history
, or when I accidentaly close the browser. Autobackups will not overwrite the local backups created by Running or Saving (see below)
Local backup before Running
So if your scene freezes the browser you don’t lose your work
Local backup before Saving
To be in sync with the server side stored copy.
Dismiss the error banner by ESC
Sometimes you just don’t want to click on the banner and navigate away from your current cursor position in the editor. This is especially annoying when you forget to close a block of code somewhere in the begininng, but the error banner points to the end of the source code.
Quick display mode switching
Something like CTRL+SPACE in Unity, so you can quickly maximize the scene or SHIFT+F11 when writing a forum message (did you know about it?). I am using the maxmized mode just right now.
Keep track of my PGs
If we implement local copies on IndexedDB we can easily offer the user his PG history.
More code templates when creating a new PG
It would be cool to have templates without comments. Maybe we can add some more sophisticated templates also. I am adding some debug code to my PGs all the time, like displaying the World Axis, dipslaying FPS (usefull when in full screen), or we could even add a selection screen, where a user can select what features he wants in the PG.
EDIT:
Autoformat on run/save as a configurable option
The PG should compare timestamps of the local copy and the server side copy and ask the user whether to load the local one when local.timestamp > server.timestamp.
I think the backup is crucial, dismissal of the error banner and quick mode switching would make our lifes easier and the other stuff is some fancy stuff.
What’s your opinion?
Thank you!
Have a nice day!
R.