Currently, I am working on developing a procedurally generated city using three.js, focusing mainly on creating buildings. One of the crucial requirements for this project is that when a user clicks on a building with their mouse, detailed information about that specific building, such as its name and location, should be displayed in a text box that hovers next to the building.
I tried to investigate if the three.js mesh object representing each building had a "data" property where this information could be stored, but unfortunately it does not.
Does anyone have any suggestions or insights on how I could implement this functionality? Thank you in advance.