How to create search bar?

Hello.
I have 1 large model in .glb that has multiple objects in it, and I would like to create 2 things in my application.

  1. When I move the cursor over the model, the screen will show the name of the object.
  2. Some search barw, here when I type the name of the object, the camera will show it to me.
    Could anyone help me how to do this?
    Thank you.

We will need more information about your project but it sounds that you both need to traverse your .glb model to search for individual geometries and set up a Raycaster to help you point at things and have a box appear on the scene whenever there is an intersection.

For the mouseover part you need a Raycaster with a Sprite or a CSS2DRenderer to display the label.

The search is the easy part, the method below will get you all the objects with a matched name, you steel need some kind of interaction to show the resulting objects, may be with an outline effect.

 searchByName(myModel: Object3D, query: string) {
    const result = [];
    myModel.travese(obj => {
        if(obj.name.includes(query)) result.push(obj)
    })
    return result;
}

Thank you for your answers.