Provide an easy way to help structure your game logic for Babylon.js based projects using ECS.
This is (currently) more about the functionality of ECS than the performance benefits.
In short if you are looking for an ECS implementation to handle 10Ks of entities,
you may want to look elsewhere.
Looks great. I haven’t seen anybody else using inspectableCustomProperties before.
I noticed you are making a tab and I hadn’t seen that before. If you add a custom property, you can get access to entity details (or anything in scope). Assuming the entity has same lifecycle as object (looks like it does from onDisposeObservable). Like this:
TBH. first time playing with custom props for inspector
I initially had Entity ID as a String, but that made it editable, will try out your approach where you mark the property readonly - thanks
Also had some issues with Options behaving weird, when 2 nodes had Options properties with same name but different set of values … should get around to filing an issue.
I already use custom properties in the Inspector. I am a big fan of tagging my meshes/nodes and using tag queries to look them up so I added Tags to the inspector.
[Update]
We just added filtering and type-completion to the entityEvents.on function.
This means that you will now be able to pass an array of components as a second argument, when registering your listener. So that you both get type completion in the callback, and the event handler will only be invoked for entities, which includes the components specified in the second argument.