Editor 3.2.0: can't add spotlight/hemispehere light, and "v4.1.0-beta.3" when V4.1 final is out

@julien-moreau I am on my first day trying Babylon js, and I like it (the Amiga red checker ball texture reminds me the old demo scene times…); I tried the editor in both online (chrome, firefox) and electron windows exe, and in all, the Add -> Sporlight, Add -> Hemispheric light does nothing. The js console gives no errors. I can add only point light, and directional light.

Is it just me or a bug? And how to add more elements (light types, meshes types) to the scene except those available from the editor menu’s, if one wants?
In the editor, I could add a script to existing objects to let these move and rotate etc. but if adding new base scene objects like lights from these scripts then… the editor becomes less useful.

Also, I noted that both online and electron exe versions use “v4.1.0-beta.3” when V4.1 final is out; in github, the version seems “v4.1.0-beta.7” from 6 months ago, and there may be more fixes since editor 3.2.0 ( from sometime 2019)? I did not try to recompile the Electron app myself from git.


Pinging @julien-moreau

Hey @fabioanfy

Honestly, I suggest, if you’re beginning with BabylonJS, to use V4 of the BabylonJS Editor. It is in its beta version and builds can be found here: BabylonJS Editor v4.0.0 beta · BabylonJS/Editor Wiki · GitHub

The documentation is coming. Are you interested to be part of the beta testers ?

Thanks for you feedbacks and response :slight_smile:

1 Like

Thanks, this was a surprise.
Please tell me if I am right about those changes I see in v4:

  1. unlike with v3 - the whole node stuff is built (110mb of js files in folder) then final js produced in a /dist and accessed in http://localhost:1338 , this I guess largely simplifies the workflow edit->build->release. However, I can no more find an “add script” to objects option, and relative code editor. There is an “open visual studio code” item that opens it in the workspace folder but you need to know what to do from there to script the objects. In other words, with the v3 editor was super easy to add a script to a mesh and make it rotate (one line in the update method: mesh.rotation.x += 0.01;), now you’re alone.

  2. this is not important for my case since I had not yet made useful project files with v3, and I guess is not difficult to support - but I don’t see a way to import the scene.editorproject files made with the v3 editor. I see a scene.editorproject format still used in "projects/scene/scene.editorproject but there’s “+add new project” only (within opened workspace), not “+import existing project”. There is a workspace.editorworkspace which includes different projects you can add and save (basically update there), but I can’t see what to do if I have a v3 scene.editorproject to include in a v4 workspace (without copy filders and edit files by hand?) I.e. compatible or import/export between them? Also, let’s say within V4 editor I have workspace1 and workspace2 and I wished to export (save as) workspace1/projectx and import it into workspace2/projecty, someone may want to do that.

I did not know the V3 either so I can’t say much more about differences - expert V3 editor users may see lots more.

1 Like

Well more widely, I don’t see a way to import/export .babylon , .glb scenes/objects?


As 0 documentation is available at the moment, I can understand the misunderstanding. I’m working on the tutorial since yesterday and will be available as a video tutorial.

For the 1. You are right, the way to attach script changed. Scripts are physically created on hard drive in TS files. You can add scripts in the assets panel -> scripts. And then select a node in the scene and attach the script to it in the inspector. You can create a project from the available templates (for example FPS) and see how scripts look like.

For the 2. The V4 of the editor has been made to don’t reproduce errors of the V3. So unfortunately (and hopefully !) v3 projects are not compatible with the V4.

1 Like

Exporting to fob/gltf is on my todo list and will be available before the official V4 is up!

Do you absolutely need glb right now? In that case I can focus on it

Sorry, I just needed documentation, what I missed seems there; just I did not see since I searched in the V3 old places.

I meant just import gltf, not export - I simply had not found where to import as the UI changed… I can see now the “Assets” tab under the preview, there: -> Meshes , I can import .babylon and .glb files there (by drag drop into). I was searching in top menu bar or something.

Also under Assets -> Scripts, I can add a script, type name, creates the .ts file, opens it in visual studio code. But unlike the V3 which creates the script already attached to the mesh (as was create by going to mesh, open menu, attach script), to attach these names .ts to a specific node or mesh, I have to write code which is fine but I have to learn still how - EDIT ok you wrote “select a node in the scene and attach the script to it in the inspector.” I just noted this so I could do the step: select object, then in the inspector (for this selected object) go to Script -> click there, select the script from the list.

What lacks is really videos - to see how to do the rotation.y += 0.01; attached to one cube for V4, same as you showed in the V3 example video, in a minute you script a specific cube and play with rotation/position/whatever from there.

I am new to visual studio code too, I have a plain base install vsc, do I have to install some plugin or configure some for optimal/full usage in Babylon js and editor V4? Unsure if you addressed vsc in docs somewhere, but since the V4 editor launches it, any recommended vsc setup info should be linked there.

Thanks for these feedbacks !

For the meshes assets, I’m missing a menu bar to add files using the UI. I’m adding right now :slight_smile:

As a feedback, I’m going to add a button “Attach New Script” to the node inspectors so the script will be attached directly instead of ceating a script and then attach it. Would be faster.

For Visual Studio Code, you don’t really need any extension to be ready to code with the Editor.
Anyway (not yet documented), it uses webpack to pack the final JS of the game and you can type “npm run watch” in the project’s folder so webpack will watch your files when you change a TS file and refresh the “dist” folder.
Finally, to play the game, just click “Play” in the editor. If you want to play in your browser, right-click the button “Play” and select “Play In My Browser…”. You’ll be able to debug the code etc.

That’s all for the basics. Is that clear ? If not, I can focus on the video tutorial right now instead of writing the tutorial :slight_smile:

Thanks to you - as I learn you do the editor alone. For me, a written tutorial (with screenshots) is even better than a video, since I can scroll across it faster to find what I need. I use videos if lost in docs as last resort.

Also, I like keyboard shortcuts full list somewhere, since there’s always something you can do only with keys, and using keys is faster than the mouse anyway. Even just reminders like click+shift for multiple selections, etc.

I think in my case both written and video tutorials must exist, so that cool :slight_smile:

For the keyboard shortcuts, I have to write the list of all available. Also, it is planned to select multiple objects in the scene and edit them but is is not available yet unfortunately

1 Like

I don’t mean to hijack this post, but for those of us wanting to be part of the beta testers, is there anything we need to do other than downloading the editor here?

1 Like

Absolutely not, just download the editor and test it. You are open to open issues for bug reports and feature requests or improvement requests.

I started documentation and is available here: Editor/doc.md at release/4.0.0 · BabylonJS/Editor · GitHub

Also coming soon with video tutorials focusing on more advanced parts

1 Like

@julien-moreau , to update: the dev of the 3d thing for the client is done by someone else, for now, not me; he got a .babylon scene exported from a 3d program, plus some json on server, then builds from there with js adding end editing stuff in just js.
I told him about the V4 beta editor, he installed, but he could not find how to load the existing .babylon scene to start from. He tried to create a new empty project from the editor, then replace its babylon.scene with the one he got, but still loaded the cube scene the same, then he gave up - also, he uses js, not ts which the editor seems to force into - in other words, he had no clue how to import his existing .babylon + .js files into the editor, so continued without so far.