Why does TransformNode constructor have `scene` and `isPure` parameters?

I know JavaScript well, but it isn’t obvious why the parameters are optional (the API docs don’t really say). Why give a node a scene? And why not give a node a scene?

They seem to be required: if you don’t provide it yourself, then Babylon goes and gets the LastCreatedScene, so no matter what, every node is apparently required to have a scene (just not always provided by the constructor).

But even so, I tried previous examples (above), including creating a new scene before making new TransformNodes without specifying scenes for them, which supposedly means they should get the LastCreatedScene that I made, yet the examples work the same, so I don’t get what the difference is. Either that, or there’s really a difference and it has caused some sort of weird memory leak where nodes are used in one scene but state is stored for them in the second scene. Its confusing, and means I’d have to really dig deep into the code to understand if I’m shooting myself in the foot or not.

Yes indeed, I’m writing code with Babylon, and was referring to the software developer experience.

PlayCanvas has a UI out of the box, just log in and jump right in to the full editor (more like Unity/Unreal than Babylon it seems to me), and f.e. see the docs on the visual node-based material editor. Besides having this, PlayCanvas code is clean.

As an example, in Three.js and PlayCanvas it has turned out to be way easier than in Babylon to load an asset into a particular node in a scene graph. I’m surprised at how difficult it is to do some simple things in Babylon. I find the code to be a bit disorganized compared even to JS libs in general, while Three.js is very well organized compared to JS libs of any kind (not just 3D libs).

These are just my opinions and thoughts. No offense intended to anyone. I hope contributors might see this and have a desire to simplify Babylon, as competition benefits everyone (even the non-Babylon users).