animint icon indicating copy to clipboard operation
animint copied to clipboard

animation API

Open cpsievert opened this issue 8 years ago • 3 comments

It'd be nice if there was more consistency between the time/duration options. For example:

d <- data.frame(
  x = 1:10,
  y = 1:10,
  z = 1:10
)
plotList <- list(
  plot = ggplot() + geom_point(
    data = d, aes(x, y, showSelected = z)
  ),
  time = list(variable = "z", ms = 1000),
  duration = list(z = 1000)
)

Is there any reason why we couldn't also support time = list(z = 1000)?

cpsievert avatar Mar 27 '16 22:03 cpsievert

Also, would it be easy to support non-linear easing? https://github.com/mbostock/d3/wiki/Transitions#ease

cpsievert avatar Mar 28 '16 04:03 cpsievert

sure both of those ideas sound great

however I think it would be better to continue to support the current syntax for the time option,

and instead introduce a new option e.g. animation=list(z=1000)

i'm open to proposals / PRs to support different easing functions, go ahead an propose a syntax and implementation if you want

tdhock avatar Mar 30 '16 18:03 tdhock

although easing functions may be difficult to test...

tdhock avatar Mar 30 '16 18:03 tdhock