Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

120
Views
selección de grupo reaccionar tres fibra

Estoy intentando "fusionar"/"agrupar" seleccionar varias mallas.

En este momento tengo algo como esto.

//envoltura

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

y los niños de la siguiente manera

 <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" />

Este resultado, por supuesto, es el deseado, ya que se cierne sobre la malla flotante.

sin embargo, también me gustaría poder agrupar ciertas mallas. He visto algo relacionado con lo que quiero hacer. https://github.com/pmndrs/drei#select

Básicamente, quiero agrupar las mallas 1 y 3, por ejemplo, de modo que si cualquiera de esas mallas se selecciona/se desplaza, se detecta que son del mismo grupo y se desplazan/resaltan ambas.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Usando la referencia de group , puede identificar a todos los niños usando

 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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!