In the Babylon project that I’m working on, each SolidParticle relates to a real world object. When the user picks a particle, I do a web call to get information on that object.
At the moment, in the initParticles method I do a very non-Typescript-like
(<any>particle).tag = this.myObjectArray[p].id;
to create a new property on the particle and assign it to the read world object Id. I can then read that tag back out when the particle is picked.
It would be nice to have “official” support for this in the way that a Mesh has the metadata property.
There is also the issue that if you do the above in the particlePosition method, the added property (tag in this case) gets removed. (I’m not totally sure why, maybe the object properties are copied).