Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

118
Vistas
group selection react three fiber

I am trying "merge"/"group" select multiple meshes.

At the moment I have something like this.

//wrapper


        <group
            onPointerOver={(e) => getOverEvent(e)}
            onPointerOut={(e) => getOutEvent(e)}
            onPointerMissed={(e) => clickOutside(e)}
            onClick={(e) => clickEvent(e)}
            dispose={null}
            ref={group}
            >
            {children}
        </group>

and children as follows


            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe.geometry}
                material={materials.laces}
                name="1"

            />
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_1.geometry}
                material={materials.mesh}
                name="2"
            >
            </mesh>
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_2.geometry}
                material={materials.caps}
                name="3"
            />

This result of course is desired, as it hovers the hovered mesh.

however i would also like to be able to group hover certain meshes I have seen something somewhat related to what i want to do. https://github.com/pmndrs/drei#select

Basically i want to group mesh 1 and 3 for example, so if either for those meshes are selected/hovered they are detected that they are of the same group and hover/highlight both of them.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Using the group ref you can identify all the children using


let my_group = group.current.getObjectByName("my_group")

console.log(my_group.children)


<group name="my_group">

            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe.geometry}
                material={materials.laces}
                name="1"

            />
            
            <mesh
                castShadow
                receiveShadow
                geometry={nodes.shoe_1.geometry}
                material={materials.mesh}
                name="2"
            >
            </mesh>

</group>


about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda