hi I have animation in useFrame which plays after click and I need to stop it after 2 seconds for example
const [clicked, click] = useState(false)
useFrame((state, delta) => (clicked ? group.current.rotation.x += 0.01 :
group.current.rotation.x))
any advice? , thanks