Convenience constructor for a two-value property animation that runs from
from to to. An optional CSS unit suffix is concatenated into both
values during serialisation (e.g. 100 with unit = "px" becomes
"100px").
Examples
anime_from_to(0, 1)
#> $from
#> [1] 0
#>
#> $to
#> [1] 1
#>
#> $unit
#> [1] ""
#>
#> $ease
#> NULL
#>
#> attr(,"class")
#> [1] "anime_from_to"
anime_from_to(0, 360, unit = "deg")
#> $from
#> [1] 0
#>
#> $to
#> [1] 360
#>
#> $unit
#> [1] "deg"
#>
#> $ease
#> NULL
#>
#> attr(,"class")
#> [1] "anime_from_to"
anime_from_to(0, 1, ease = anime_easing_spring())
#> $from
#> [1] 0
#>
#> $to
#> [1] 1
#>
#> $unit
#> [1] ""
#>
#> $ease
#> $name
#> [1] "spring"
#>
#> $params
#> $params$bounce
#> [1] 0.5
#>
#> $params$duration
#> [1] 628
#>
#>
#> attr(,"class")
#> [1] "anime_easing"
#>
#> attr(,"class")
#> [1] "anime_from_to"