Skip to content

enum

Position

pub enum Position {
    At(f64),
    End(f64),
    PrevStart(f64),
    PrevEnd(f64),
    Label(String, f64),
}

GSAP's position parameter.

Variants

At

At(f64)

An absolute time.

End

End(f64)

Relative to the end of the timeline ("+=1", "-=0.5").

PrevStart

PrevStart(f64)

Relative to the start of the previous child ("<", "<0.2").

PrevEnd

PrevEnd(f64)

Relative to the end of the previous child (">", ">-0.1").

Label

Label(String, f64)

At a label, plus an offset ("intro", "intro+=0.5").

Methods

parse

pub fn parse(s: &str) -> Option<Position>

Parse a position string; "" means the end of the timeline.

Trait implementations