You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, i think i'm doing something wrong using spring animations.
i've create multiple spring objects that start from a fixed place in the window, then they move to an y and after that they restart this cycle from the bottom of the page.
This is kinda working, but there is a second movement triggered by the mouse move that move this element kinda like the 'wind' or similar shifting to left-right /top-bottom
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello, i think i'm doing something wrong using spring animations.
i've create multiple spring objects that start from a fixed place in the window, then they move to an y and after that they restart this cycle from the bottom of the page.
This is kinda working, but there is a second movement triggered by the mouse move that move this element kinda like the 'wind' or similar shifting to left-right /top-bottom
`
const Element = ({ from, type, src, notify, magicOffset, targetY, resetY, }) => {
}
`
in the mouseMoveHandler is set the new x and y to simulate the wind effect, but the x movement is not smooth like the y one.
Can someone help me?
also, is there is a better mode to reset the effect once reaching the y target?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions