Running editor on remote server?

Hi all,

I have been beginning to use (just since this past afternoon) the Babylon.JS editor in the browser. I tried to compile desktop version (Ubuntu 18.04 LTS), but it failed. I then compiled the desktop Electron version and got a million red errors, but it seemingly worked, and I ran the editor. I’m just not sure if it worked completely because there are many error and they are like this:

anatoly@computer:~/al/Editor$ git clone https://github.com/gotwig/Editor

I then installed gulp and did this:
gulp electron --linux --arch=x64

Then this:

[16:32:33] Using gulpfile ~/al/Editor/gulpfile.js
[16:32:33] Starting 'build-extensions'...
[16:32:33] Starting 'typescript-compile'...
[16:32:38] Finished 'build-extensions' after 4.45 s
website/sources/gui/babylon.editor.guiCodeEditor.ts(2,51): error TS2503: Cannot find namespace 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(15,35): error TS2503: Cannot find namespace 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(36,32): error TS2304: Cannot find name 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(73,39): error TS2304: Cannot find name 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(2,51): error TS4020: Extends clause of exported class 'GUICodeEditor' has or is using private name 'monaco'.
[16:32:44] TypeScript: 4 semantic errors
[16:32:44] TypeScript: 1 declaration error
[16:32:44] TypeScript: 1 emit error
[16:32:44] TypeScript: emit failed
[16:32:44] Finished 'typescript-compile' after 11 s
[16:32:44] Starting 'build'...
Parsing typescript definitions files and generating JSON file...
Finished parsing...
website/sources/gui/babylon.editor.guiCodeEditor.ts(2,51): error TS2503: Cannot find namespace 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(15,35): error TS2503: Cannot find namespace 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(36,32): error TS2304: Cannot find name 'monaco'.
website/sources/gui/babylon.editor.guiCodeEditor.ts(73,39): error TS2304: Cannot find name 'monaco'.
[16:32:51] TypeScript: 4 semantic errors
[16:32:51] TypeScript: emit succeeded (with errors)
[16:32:54] Finished 'build' after 9.99 s
[16:32:54] Starting 'electron'...
[16:32:54] Finished 'electron' after 13 ms
Packaging app for platform linux x64 using electron v1.4.13
No errors
[ 'electronPackages/babylonjs-website-linux-x64' ]
Copying package.json into the package...
Done.
No Errors
Package now available at : electronPackages/babylonjs-website-linux-x64

My question now is if there is a way to run the complete editor from a remote virtual private server. I have several VPS’s for testing my game, and so the assets are all already on the server and neatly organized. My local hard drive is unholy mess. I’m just wondering if there is a way to also run the editor on the server so that nothing important is on my machine. Like can I set up editor.babylonjs.com, but on my server with my server’s (persistent) file system?

Thank you for your help,
Anatoly

let me ping Luaacro offline as he is not yet on the new forum :smiley:

Thank you! I did clone the official Editor repo on my VPS, then I ran this:

npm i
npm run webserver

Going to mysite.net:1338 from my client computer (in completely different location from VPS) had the “Loading Editor” spinning thing, but never stopped “Loading Editor”, so I don’t think it works properly.

Server console during use:

[Thu Dec 13 2018 23:17:04 GMT+0000 (UTC)] "GET /css/fonts/Roboto-reg-400.woff2" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
[Thu Dec 13 2018 23:17:04 GMT+0000 (UTC)] "GET /dist/editor.js" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0"
[Thu Dec 13 2018 23:17:04 GMT+0000 (UTC)] "GET /dist/editor.js" Error (404): "Not found"

Hey @Anatoly_Belousov happy that you use the editor.
You are right, the official repository is here: GitHub - BabylonJS/Editor: Visual editor for Babylon.js
Once you install dependencies (npm i), you have to build the editor before starting running the server: “npm run build”

But I noticed that the babylonjs-gui module has errors in its typings (pinging @Deltakosh) so you’ll have to:
npm run compile (makes an error but that’s ok, it compiled)
npm run compile-electron
npm run bundle

This will compile the editor and also create the electron version. Do you prefer to use the electron version or the web version?

For @Deltakosh the errors are:
node_modules/babylonjs-gui/babylon.gui.module.d.ts:1671:29 - error TS2307: Cannot find module ‘2D’.

1671 import { Measure } from “2D”;
~~~~

node_modules/babylonjs-gui/babylon.gui.module.d.ts:2265:53 - error TS2307: Cannot find module ‘2D’.

2265 import { AdvancedDynamicTexture, Measure } from “2D”;
~~~~

well it works in the inspector for instance.

But wait we will probably merge the new module works that @sebavan was working on since 2 months and all these issues should disappear

@Deltakosh cool that’s ok for me :slight_smile:
@Anatoly_Belousov would be happy if you can test this build (http://editor.babylonjs.com/BabylonJS%20Editor.zip) to let me know if my linux build works, thanks :slight_smile:

@julien-moreau wow both of those worked! I am still learning the very basics of the editor, so take my saying that with a grain of salt, but everything seemed to be working. Thank you so much. I think it would be best for me to use the local Electron version for now, because any self-respecting remote deployment of the Babylon editor should have both user authentication and cloud/server storage/vcs. But that is a kind of big project that I cannot do right now, so I will be grateful for the local version :smile: Maybe in the future I can contribute such things to Babylon.js if I do them. Thank you and @Deltakosh so much for your help!

1 Like

Excellent! Will the deploy my own linux builds from now :slight_smile: (wasn’t sure because I used the bash on ubuntu on window to build the linux one)

For the remote part, there is already a way to implement your own storage (for reading, saving files etc.) plugin. Let me know once you want and I’ll help you :slight_smile:

1 Like


hello, I want to consulting is the visual editor, this is our company before use OGRE engine implementation of a visual editor, he can realize scene loading, import resources, scene drag, add to a series of functions such as check, and my job now is to need to put these functions above Babylonjs, before I do the part with Ztree plug-ins tree, but I saw you this visual editor, to be honest, I am very interested in, but I know it is not the editor, can I put this editor embedded in my current project,And then it opens up in the browser, or the editor is just a local.exe that only works locally, or it can do all the things I said above, and I just need to use it

@ranwei-001 there is no need to ask the same questions on all the editor related thread.

Julien will answer soon on the other topic no worry

@ julien-moreau伟大的贡献者
Hey!friend,how is the 3DGui used in your scene implemented? I also want to implement it in my own scene

Hi Julien,
I downloaded the Linux version of the editor. I unpacked the archive but I don’t know how to get it started in Linux Mint 19.2 - 64 bit (Mate). I have found no instructions anywhere. Could you please help me understand how to get it started? Thanks

Addenda: Ok, maybe I solved by flagging “babylonjs-editor” as an executable. If I click on the top menu the application exits without a reason. Furthermore at the request “An update is available (v3.1.3)! Would you like to download it?” I press Yes and it asks me for a route but does not make any updates.

@Zeirus thanks for reporting!
Yeah babylonjs_editor is the executable. I’m fixing the update feature to work on Linux. I’ll let you know once done and will share you a link to update to the latest version directly.

Thanks!

1 Like