Jump to content
Search Community

oliver1999

Members
  • Posts

    6
  • Joined

  • Last visited

Community Answers

  1. oliver1999's post in What should I choose for a 3D object?(gsap , gltfjsx) was marked as the answer   
    Thank you , my problem solved by using useRef and pass it to the <group> like following code:
    ````
      const rotateGSAP = useRef()     const tl = new TimelineMax();     tl.fromTo(rotateGSAP.current.rotation ,        {         y:0,       },       {         y:40,       }     );
        return (           <group ref={rotateGSAP} rotation={[Math.PI / 2, 0, 0]}>             <mesh geometry={nodes.defaultMaterial.geometry} material={materials.bottle} />             <mesh geometry={nodes.defaultMaterial_1.geometry} material={materials.wrap} />           </group>
    ); ````
×
×
  • Create New...