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
Is it possible to link a timeline's events to separate onScrolls?
const tl = createTimeline( autoplay: false );
tl..add('.square', { x: '15rem' }) // scrollOne should be linked to this
.add('.square', { rotate '1turn' }); // scrollTwo should trigger this
// To move the square when it's between the bottom and center of viewport
let scrollOne = onScroll({
enter: 'bottom top',
leave: 'center top'
sync: true,
debug: true,
})
// To rotate the square when it's between the center and top of viewport
let scrollTwo = onScroll({
enter: 'center top',
leave: 'top top',
sync: true,
debug: true,
})
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
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to link a timeline's events to separate onScrolls?
Beta Was this translation helpful? Give feedback.
All reactions