struct
Scroll
pub struct Scroll {
/* private fields */
}A scroll trigger for a tween or timeline.
Methods
new
pub fn new(target: impl Into<Targets>) -> ScrollTrigger on target scrolling into view ("top 85%" by default).
start
pub fn start(self, edge: &str) -> ScrollWhere it starts: an edge ("top 80%": the trigger's top at 80% down the viewport).
scrub
pub fn scrub(self, smoothing: f64) -> ScrollTie progress to the scroll position; smoothing seconds of lag (0 for none).
actions
pub fn actions(self, actions: &str) -> ScrollGSAP toggleActions, e.g. "play reverse play reverse".