ฉันเป็นคนใหม่โดย Framer นการเคลื่อนไหวอะไรที่ฉันกำลังพยายามทำคือ imitating ขับเคลื่อนไหวโดยการย้ายภาพในขณะที่มันกำลังหมุน
ฉันไม่รู้ว่าต้องทำให้มันทำงาน
ฉันพยายามอะไรแบบนี้แต่มันไม่ทำงาน
const imageRuning :Variants = {
hidden:{
x:"-100vw",
opacity:0
},
visible:{
x:0,
opacity:1,
transitionDuration:"3s"
},
rotation:{
rotate:[180,0],
transition:{
repeat:Infinity,
type:"tween",
ease:"linear"
}
}
}
const HomePage =()=> {
return (
<div className={style.animationContainer}>
<motion.img
className={style.animatedImage}
variants={imageRuning}
initial="hidden"
animate={["visible","rotation"]}
width={100} height={100} src="/static/me.jpg" >
</motion.img>
</div>
)
ช่วยได้โปรด